Browse Source

Don't attempt to read chunks with bad length Fix #460

Former-commit-id: 86da0c1812ebb3db389d271edf6e8ca81167ba60
Former-commit-id: 93b28d11ed01296011abb4eb6bcb03c89e61ad49
Former-commit-id: 0ecfd461c9a6b5b2fe9aa8632534f8cbd5e0166c
af/merge-core
James Jackson-South 10 years ago
parent
commit
7525d038cb
  1. 5
      src/ImageProcessorCore/Formats/Png/PngDecoderCore.cs

5
src/ImageProcessorCore/Formats/Png/PngDecoderCore.cs

@ -413,6 +413,11 @@ namespace ImageProcessorCore.Formats
return null;
}
if (chunk.Length <= 0)
{
return null;
}
byte[] typeBuffer = this.ReadChunkType(chunk);
this.ReadChunkData(chunk);

Loading…
Cancel
Save