mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-12 05:42:52 +00:00
The editor's read of a font program bounded all its filter stages together by the program's 16 MiB limit, as main does: a 12 MiB program behind ASCIIHex and Flate, its Flate data about 8 MiB, was left unread, though behind Flate alone it reads. It now takes the limit once for each stage, as the metrics reads do, which the stages share and any one of them may use, and then holds the program itself to 16 MiB. Behind eight filters a read may so decode up to 128 MiB, where main stopped at 16 MiB. Once the allowance is spent, the metrics reads refuse a stream with data, and the editor's program read passes a program over, before resolving its /DecodeParms, as the decode itself would refuse it, so each font left doesn't pay for that work the allowance doesn't count. What is read and what is refused are as before, an empty stream still read rather than refused. Tests: an_editors_program_reads_behind_ascii_hex_and_flate_within_its_limit, and an_empty_stream_reads_with_nothing_left. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY