Browse Source

Ensure we pass exactly 40 bytes when parsing the BmpHeader

pull/530/head
Jason Nelson 8 years ago
parent
commit
8004fa1799
  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