mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
0374c1eb3b
If `Document::resolve()` was called during parsing, it'd change the reader's current position, so the parsing code that called it would then end up at an unexpected position in the file. Parser.cpp already had special-case recovery when a stream's length was stored in an indirect reference. Commit ead02da98ac70c ("/JBIG2Globals") in #23503 added another case where we could resolve indirect reference during parsing, but wasn't aware of having to save and restore the reader position for that. Put the save/restore code in `DocumentParser::parse_object_with_index` instead, right before the place that ultimately changes the reader's position during `Document::resolve`. This fixes `/JBIG2Globals` and lets us remove the special-case code for `/Length` handling. Since this is kind of subtle, include a test. |
||
---|---|---|
.. | ||
BenchmarkPDF.cpp | ||
CMakeLists.txt | ||
colorspaces.pdf | ||
complex.pdf | ||
encoding.pdf | ||
encryption_nocopy.pdf | ||
jbig2-globals.pdf | ||
linearized.pdf | ||
non-linearized.pdf | ||
oss-fuzz-testcase-62065.pdf | ||
password-is-sup.pdf | ||
pattern.pdf | ||
rotate.pdf | ||
standard-14-fonts.pdf | ||
TestPDF.cpp | ||
text.pdf | ||
type1.pdf | ||
type3.pdf | ||
wide-gamut-only.pdf |