mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-27 03:27:21 -06:00
A poster scale large enough to make both tile counts saturate at usize::MAX overflowed when they were multiplied for the 1024-sheet check: a panic with overflow checks, and a product that wraps to 1 without them, which let the sheet loops run. The headless doc_print tool accepts any finite positive scale, so a script could reach it. Multiply with checked_mul and treat an overflow as over the limit, so the request gets the existing "more than 1024 sheets" error. Adds tests::huge_posters_are_refused_at_the_sheet_limit, which panics before this change and passes with and without overflow checks after it.