diff --git a/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs b/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs index 350823dec..298982f8d 100644 --- a/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs +++ b/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs @@ -1471,8 +1471,6 @@ namespace SixLabors.ImageSharp.Formats.Bmp } } - this.infoHeader.VerifyDimensions(); - int skipAmount = this.fileHeader.Offset - (int)this.stream.Position; if ((skipAmount + (int)this.stream.Position) > this.stream.Length) { diff --git a/src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs b/src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs index ca52e4db1..15b0297de 100644 --- a/src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs +++ b/src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs @@ -552,23 +552,5 @@ namespace SixLabors.ImageSharp.Formats.Bmp dest = this; } - - internal void VerifyDimensions() - { - if (this.Width > MaximumBmpDimension || this.Height > MaximumBmpDimension) - { - throw new InvalidOperationException( - $"The input bmp '{this.Width}x{this.Height}' has a width or height " - + $"bigger then the max allowed '{MaximumBmpDimension}'"); - } - - long size = this.Width * this.Height; - if (size > MaximumBmpSize) - { - throw new InvalidOperationException( - $"The input bmp '{this.Width}x{this.Height}' has a size {size}" - + $"bigger then the max allowed '{MaximumBmpSize}'"); - } - } } }