mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-07 15:51:56 +00:00
The room estimate for a large PNG read a row at a time counted 32 bytes a column. The png reader also keeps at least 128 KiB of rows already read, the 32 KiB deflate window and a growth step in its stream buffer, and up to four rows for wide images, so a decode could be approved with less room than reading takes. The estimate now comes from the PNG header's row length and these buffers, and a PNG is read a row at a time only while that estimate fits the decode allowance.