mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 02:07:09 -06:00
A new import fuzz test, pdf_resources_the_reader_cannot_parse_never_panic, imports a page whose resources hold: - a value the reader can't parse (/#zz, 12-.5) or one it reads (/Fine) in the color space dictionary, before a Separation space the page paints in, and in the font dictionary, before the font of its text; - a calculator function written as the shading's function, or inside an array or a dictionary in the page's /Properties: a plain one, one with Columns 0, one with a huge Columns, or one of 257 MiB of deflated spaces. The import must not panic. The file opens with its art, or it is refused with "would decode to more than 256 MB" when the function is not plain. With the nesting check, the font scan or the ink scan reading Dict::entries again, the test fails on a value the reader can't parse. With the stream check made on the file's objects alone, the test fails on every function that is not plain: the file opens instead of being refused. The calculator helper of pdf_streams_the_reader_would_fail_on_are_refused is now a function of the file, and the function of spaces is made once.