From 22421dbfcb9fbf7165dd8f461ff96f2fb97b74ab Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Wed, 29 Jun 2022 23:54:07 +1000 Subject: [PATCH] Limit to collection max --- src/ImageSharp/Formats/DecoderOptions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/Formats/DecoderOptions.cs b/src/ImageSharp/Formats/DecoderOptions.cs index 6ed66db92..95b02a0ae 100644 --- a/src/ImageSharp/Formats/DecoderOptions.cs +++ b/src/ImageSharp/Formats/DecoderOptions.cs @@ -10,7 +10,7 @@ namespace SixLabors.ImageSharp.Formats /// public sealed class DecoderOptions { - private uint maxFrames = uint.MaxValue; + private uint maxFrames = int.MaxValue; /// /// Gets or sets a custom Configuration instance to be used by the image processing pipeline. @@ -30,6 +30,6 @@ namespace SixLabors.ImageSharp.Formats /// /// Gets or sets the maximum number of image frames to decode, inclusive. /// - public uint MaxFrames { get => this.maxFrames; set => this.maxFrames = Math.Min(Math.Max(value, 1), uint.MaxValue); } + public uint MaxFrames { get => this.maxFrames; set => this.maxFrames = Math.Min(Math.Max(value, 1), int.MaxValue); } } }