mirror of
https://github.com/SerenityOS/serenity
synced 2026-04-25 17:15:42 +02:00
The stream in the PNG in #26595 contains a compressed block followed by an uncompressed block of size 0, followed by EOF. Such a block is apparently written for Z_SYNC_FLUSH. zlib is very lenient about data ending abruptly. Since it's enough for the PNGs written by ghostscript, allow an empty uncompressed packet at stream end to act as if it's the final packet, even if that's still stricter than zlib -- it's lenient enough for the current problem. We can always become even more lenient in the future if it we find something else that requires that. Fixes #26595.