From 7f4c9cdd8fd337d13e27c79bb045928ccb2fd70b Mon Sep 17 00:00:00 2001 From: jubilant-enigma <54286000+jubilant-enigma@users.noreply.github.com> Date: Mon, 6 Dec 2021 10:33:08 -0800 Subject: [PATCH] Update src/ImageSharp/Formats/Png/PngDecoderCore.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Günther Foidl --- src/ImageSharp/Formats/Png/PngDecoderCore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageSharp/Formats/Png/PngDecoderCore.cs b/src/ImageSharp/Formats/Png/PngDecoderCore.cs index 6db2328f58..a08242e687 100644 --- a/src/ImageSharp/Formats/Png/PngDecoderCore.cs +++ b/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]) {