Browse Source

Ensure we pass exactly 40 bytes when parsing the BmpHeader

af/merge-core
Jason Nelson 8 years ago
parent
commit
36ec32e45d
  1. 2
      src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs

2
src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs

@ -498,7 +498,7 @@ namespace SixLabors.ImageSharp.Formats.Bmp
else if (headerSize >= BmpInfoHeader.Size)
{
// >= 40 bytes
this.infoHeader = BmpInfoHeader.Parse(buffer);
this.infoHeader = BmpInfoHeader.Parse(buffer.AsSpan(0, 40));
}
else
{

Loading…
Cancel
Save