mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
a533ea7ae6
When parsing streams we rely on a /Length item being defined in the stream's dictionary to know how much data comprises the stream. Its value is usually a direct value, but it can be indirect. There was however a contradiction in the code: the condition that allowed it to read and use the /Length value required it to be a direct value, but the actual code using the value would have worked with indirect ones. This meant that indirect /Length values triggered the fallback, "manual" stream parsing code. On the other hand, this latter code was also buggy, because it relied on the "endstream" keyword to appear on a separate line, which isn't always the case. This commit both fixes the bug in the manual stream parsing scenario, while also allowing for indirect /Length values to be used to parse streams more directly and avoid the manual approach. The main caveat to this second change is that for a brief period of time the Document is not able to resolve references (i.e., before the xref table itself is not parsed). Any parsing happening before that (e..g, the linearization dictionary) must therefore use the manual stream parsing approach. |
||
---|---|---|
.. | ||
Fonts | ||
CMakeLists.txt | ||
ColorSpace.cpp | ||
ColorSpace.h | ||
CommonNames.cpp | ||
CommonNames.h | ||
Document.cpp | ||
Document.h | ||
DocumentParser.cpp | ||
DocumentParser.h | ||
Encoding.cpp | ||
Encoding.h | ||
Encryption.cpp | ||
Encryption.h | ||
Error.h | ||
Filter.cpp | ||
Filter.h | ||
Forward.h | ||
Interpolation.cpp | ||
Interpolation.h | ||
Object.h | ||
ObjectDerivatives.cpp | ||
ObjectDerivatives.h | ||
Operator.h | ||
Parser.cpp | ||
Parser.h | ||
Reader.cpp | ||
Reader.h | ||
Reference.h | ||
Renderer.cpp | ||
Renderer.h | ||
Value.cpp | ||
Value.h | ||
XRefTable.h |