Browse Source

Update src/ImageSharp/Formats/Png/PngDecoderCore.cs

Co-authored-by: Günther Foidl <gue@korporal.at>
pull/1877/head
jubilant-enigma 4 years ago
committed by GitHub
parent
commit
7f4c9cdd8f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ImageSharp/Formats/Png/PngDecoderCore.cs

2
src/ImageSharp/Formats/Png/PngDecoderCore.cs

@ -1022,7 +1022,7 @@ namespace SixLabors.ImageSharp.Formats.Png
for (int i = 0; i < dataLength; i++)
{
byte parsed = Convert.ToByte(dataSpanString.Substring(i * 2, 2), 16);
if (i < ExifHeader.Length)
if ((uint)i < (uint)ExifHeader.Length)
{
if (parsed != ExifHeader[i])
{

Loading…
Cancel
Save