Jay Berkenbilt
d0e99f195a
More robust handling of type errors
...
Give objects descriptions and context so it is possible to issue
warnings instead of fatal errors for attempts to access objects of the
wrong type.
2018-02-18 21:06:27 -05:00
Jay Berkenbilt
9910104442
Implement TokenFilter and refactor Pl_QPDFTokenizer
...
Implement a TokenFilter class and refactor Pl_QPDFTokenizer to use a
TokenFilter class called ContentNormalizer. Pl_QPDFTokenizer is now a
general filter that passes data through a TokenFilter.
2018-02-18 21:05:46 -05:00
Jay Berkenbilt
fefe25030e
Inline image token type
2018-02-18 21:05:46 -05:00
Jay Berkenbilt
2699ecf13e
Push QPDFTokenizer members into a nested structure
...
This is for protection against future ABI breaking changes.
2018-02-18 21:05:46 -05:00
Jay Berkenbilt
d97474868d
Lexer enhancements: EOF, comment, space
...
Significant enhancements to the lexer to improve EOF handling and to
support comments and spaces as tokens. Various other minor issues were
fixed as well.
2018-02-18 20:18:40 -05:00
Jay Berkenbilt
13d9756a45
Minor fixes to tokenizer
2018-01-28 18:34:43 -05:00
Jay Berkenbilt
fabff0f3ec
Limit token length during xref recovery
...
While scanning the file looking for objects, limit the length of
tokens we allow. This prevents us from getting caught up in reading a
file character by character while digging through large streams.
2017-08-22 14:13:10 -04:00
Jay Berkenbilt
03aa9679ac
Find starxref without PCRE
2017-08-10 21:30:32 -04:00
Jay Berkenbilt
ef8ae5449d
Allow QPDFTokenizer::readToken to return bad tokens
...
Sometimes we want to ignore bad tokens rather than having them throw
an exception. A coverage case is commented out here and added in a
later commit.
2017-08-10 19:01:41 -04:00
Pranjal Bhor
6f88fd36ab
Include missing header in QPDFTokenizer.cc ( fixes #125 )
...
Required for strtol()
2017-07-30 08:47:05 -04:00
Jay Berkenbilt
dd8dad74f4
Move lexer helper functions to QUtil
2017-07-27 13:59:56 -04:00
Jay Berkenbilt
0a745021e7
Remove PCRE from QPDFTokenizer
2017-07-27 13:59:56 -04:00
Jay Berkenbilt
ac9c1f0d56
Security: replace operator[] with at
...
For std::string and std::vector, replace operator[] with at. This was
done using an automated process. See README.hardening for details.
2013-10-18 10:45:14 -04:00
Jay Berkenbilt
30027481f7
Remove all old-style casts from C++ code
2013-03-04 16:45:16 -05:00
Jay Berkenbilt
f81152311e
Add QPDFObjectHandle::parseContentStream method
...
This method allows parsing of the PDF objects in a content stream or
array of content streams.
2013-01-20 15:35:39 -05:00
Jay Berkenbilt
29e9c34fe3
Bug fix: let EOF resolve literal token
...
Previously only whitespace and comments did it. This fix is needed
for object streams whose last object is a literal (name, integer,
real, string) not terminated by space or newline.
2012-08-11 09:29:04 -04:00
Jay Berkenbilt
137dc7acb9
Refactor: move resolution of literal to its own method
2012-08-11 09:22:59 -04:00
Jay Berkenbilt
f3e267fce2
Move readToken from QPDF to QPDFTokenizer
2012-07-21 09:06:10 -04:00
Jay Berkenbilt
5d4cad9c02
ABI change: fix use of off_t, size_t, and integer types
...
Significantly improve the code's use of off_t for file offsets, size_t
for memory sizes, and integer types in cases where there has to be
compatibility with external interfaces. Rework sections of the code
that would have prevented qpdf from working on files larger than 2 (or
maybe 4) GB in size.
2012-06-20 15:20:26 -04:00
Jay Berkenbilt
11314a9551
Don't declare any PCRE objects static.
2011-12-28 14:32:33 -05:00
Jay Berkenbilt
44cbd3d4b4
do DLL_EXPORT only in header files and only at the class or top-level function level
...
git-svn-id: svn+q:///qpdf/trunk@796 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-12 01:15:55 +00:00
Jay Berkenbilt
f3d7c26de1
removed qexc; non-compatible ABI change
...
git-svn-id: svn+q:///qpdf/trunk@709 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-09-26 18:36:04 +00:00
Jay Berkenbilt
1e74c03acd
stick DLL_EXPORT in front of every public method of every public class
...
git-svn-id: svn+q:///qpdf/trunk@688 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-08-06 19:00:25 +00:00
Jay Berkenbilt
91cb7c0a58
fix many typos in comments and strings
...
git-svn-id: svn+q:///qpdf/trunk@651 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-02-21 02:54:31 +00:00
Jay Berkenbilt
76bf91765e
missing header files for gcc 4.3
...
git-svn-id: svn+q:///qpdf/trunk@607 71b93d88-0707-0410-a8cf-f5a4172ac649
2008-05-04 16:02:53 +00:00
Jay Berkenbilt
9a0b88bf77
update release date to actual date
...
git-svn-id: svn+q:///qpdf/trunk@599 71b93d88-0707-0410-a8cf-f5a4172ac649
2008-04-29 12:55:25 +00:00