rayrobdod / png-inflate

A clean filter for git that decompresses png images
Apache License 2.0
2 stars 0 forks source link

Don't assume that IEND is the last chunk of a file #3

Closed rayrobdod closed 3 years ago

rayrobdod commented 3 years ago

For two purposes: first to avoid data loss when given an invalid PNG file (the file is already corrupt so what data is there to loose, but still), and because IEND is not the last chunk of an MNG file.

This probably involves detecting where an EOF is in ::png::Chunk::read and telling the difference between "there is no chunk to read" and "read an incomplete chunk"

rayrobdod commented 3 years ago

Fix merged into main as of ac42463565b7cab48b52bafeec771d8c34b598eb