mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-10 13:01:29 +00:00
- render_warning_text (crates/automation/src/pages.rs, on main since this branch was cut) matched RenderWarning exhaustively and did not build with the new variant. It now names it, in the CLI's words, so page_render and render_preview report the skip. A workspace search finds no other match on RenderWarning outside pdfcraft-render. - An Indexed lookup is a string or a stream (8.6.6.3). Indexed::new and is_malformed_indexed tried it as a stream first; a failed stream read of a reference consumed the reference, so a string lookup given by reference was never found and the image was skipped. The lookup is now read once and dispatched by type, in both places. - hival is judged before the base: an out-of-range hival rules the space out even when the base cannot be read (the table size still needs the base, so a usable hival keeps today's handling there). The size check is unchanged: hival is range-checked to 0..=255 before (hival + 1) * m is formed with checked_add/checked_mul. Tests (each seen failing with a fault injected): bounds at DeviceCMYK, DeviceGray and hival 255 (exact and one short); hivals past u32/u64/any integer, negative and fractional (with unchecked arithmetic and the range widened the test panics with "attempt to multiply with overflow"); a lookup string by reference (fails with the old stream-then-string read); an unreadable base with hival 300; an undecodable lookup stream; and page_render reporting the skip (without the new arm the crate does not build, E0004). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv