mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
Several files have a comment after the trailer dict and the `startxref` after it. We really should add a consume_whitespace_and_comments() function and call that in most places we currently call consume_whitespace(). But in this case, for non-linearized files, we first jump to the end of the file, read `startxref`, then jump to `xref` from the offset there, and then read the trailer after the `xref`, only to read `startxref` again. So we can just not do that. (For linearized files, we now completely ignore `startxref`. But we don't use the data in `startxref` in linearized files anyways, so it's fine to not read it there too.) Reduces number of crashes on 300 random PDFs from the web (the first 300 from 0000.zip from https://pdfa.org/new-large-scale-pdf-corpus-now-publicly-available/) from 25 (8%) to 23 (7%).
33 KiB
33 KiB