mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-01 05:58:12 -06:00
An image's /JBIG2Globals were decoded with the 1 GiB any stream may decode to, before the JBIG2 page's size is known, so the page's pixel limit didn't bound them: a few kilobytes of Flate could make export allocate up to 1 GiB. They now decode within MAX_GLOBALS (32 MiB); globals past it skip the image, with the limit in the reason. The test covers one byte over and exactly the limit, and the image's /DecodeParms direct, by reference and in an array. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>