We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 177c866 + f0e3ae6 commit 6e7c1d0Copy full SHA for 6e7c1d0
MetadataExtractor/Formats/Png/PngMetadataReader.cs
@@ -264,7 +264,9 @@ private static IEnumerable<Directory> ProcessChunk(PngChunk chunk)
264
{
265
if (compressionMethod == 0)
266
267
- if (!TryDeflate(bytes, bytesLeft, out textBytes, out string? errorMessage))
+ reader.Skip(2); // Skip over the zlib header bytes (78 9C)
268
+ bytesLeft -= 2;
269
+ if (!TryDeflate(reader.GetBytes(bytesLeft), bytesLeft, out textBytes, out string? errorMessage))
270
271
var directory = new PngDirectory(PngChunkType.iTXt);
272
directory.AddError($"Exception decompressing PNG {nameof(PngChunkType.iTXt)} chunk with keyword \"{keyword}\": {errorMessage}");
0 commit comments