mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:47:35 +00:00
LibPDF: Disallow parsing indirect values as operands
An operation like 0 0 0 RG would have been confused for [ 0, 0 0 R ] G
This commit is contained in:
parent
04cb00dc9a
commit
65e83bed53
2 changed files with 17 additions and 5 deletions
|
@ -38,7 +38,12 @@ public:
|
|||
void move_by(size_t count) { m_reader.move_by(count); }
|
||||
void move_to(size_t offset) { m_reader.move_to(offset); }
|
||||
|
||||
PDFErrorOr<Value> parse_value();
|
||||
enum class CanBeIndirectValue {
|
||||
No,
|
||||
Yes
|
||||
};
|
||||
|
||||
PDFErrorOr<Value> parse_value(CanBeIndirectValue = CanBeIndirectValue::Yes);
|
||||
PDFErrorOr<Value> parse_possible_indirect_value_or_ref();
|
||||
PDFErrorOr<NonnullRefPtr<IndirectValue>> parse_indirect_value(u32 index, u32 generation);
|
||||
PDFErrorOr<NonnullRefPtr<IndirectValue>> parse_indirect_value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue