diff options
author | Jay Berkenbilt <ejb@ql.org> | 2019-08-19 03:26:19 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2019-08-20 01:48:27 +0200 |
commit | 42d396f1dd8d38294e45b14021cd72c13850a53b (patch) | |
tree | c4f0eed9ce9d048a7db7322050fd5b73d67a8d3c /include | |
parent | d9dd99eca32e44788165ce169f1e59498ad1c16e (diff) | |
download | qpdf-42d396f1dd8d38294e45b14021cd72c13850a53b.tar.zst |
Handle invalid name tokens symmetrically for PDF < 1.2 (fixes #332)
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFObjectHandle.hh | 3 | ||||
-rw-r--r-- | include/qpdf/QPDFTokenizer.hh | 9 |
2 files changed, 2 insertions, 10 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 4f18cbda..1b0d481b 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -1039,7 +1039,8 @@ class QPDFObjectHandle static void parseContentStream_data( PointerHolder<Buffer>, std::string const& description, - ParserCallbacks* callbacks); + ParserCallbacks* callbacks, + QPDF* context); std::vector<QPDFObjectHandle> arrayOrStreamToStreamArray( std::string const& description, std::string& all_description); static void warn(QPDF*, QPDFExc const&); diff --git a/include/qpdf/QPDFTokenizer.hh b/include/qpdf/QPDFTokenizer.hh index c28d3c89..a3aa2ab4 100644 --- a/include/qpdf/QPDFTokenizer.hh +++ b/include/qpdf/QPDFTokenizer.hh @@ -106,14 +106,6 @@ class QPDFTokenizer QPDF_DLL QPDFTokenizer(); - // PDF files with version < 1.2 allowed the pound character - // anywhere in a name. Starting with version 1.2, the pound - // character was allowed only when followed by two hexadecimal - // digits. This method should be called when parsing a PDF file - // whose version is older than 1.2. - QPDF_DLL - void allowPoundAnywhereInName(); - // If called, treat EOF as a separate token type instead of an // error. This was introduced in QPDF 4.1 to facilitate // tokenizing content streams. @@ -221,7 +213,6 @@ class QPDFTokenizer // Lexer state state_e state; - bool pound_special_in_name; bool allow_eof; bool include_ignorable; |