Browse Source

Limit to collection max

pull/2180/head
James Jackson-South 4 years ago
parent
commit
22421dbfcb
  1. 4
      src/ImageSharp/Formats/DecoderOptions.cs

4
src/ImageSharp/Formats/DecoderOptions.cs

@ -10,7 +10,7 @@ namespace SixLabors.ImageSharp.Formats
/// </summary>
public sealed class DecoderOptions
{
private uint maxFrames = uint.MaxValue;
private uint maxFrames = int.MaxValue;
/// <summary>
/// Gets or sets a custom Configuration instance to be used by the image processing pipeline.
@ -30,6 +30,6 @@ namespace SixLabors.ImageSharp.Formats
/// <summary>
/// Gets or sets the maximum number of image frames to decode, inclusive.
/// </summary>
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); }
}
}

Loading…
Cancel
Save