2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-01 11:22:29 +00:00
Commit Graph

1159 Commits

Author SHA1 Message Date
Jay Berkenbilt
f010e07c0c Add missing #include of <string> 2013-10-28 20:59:58 -04:00
Jay Berkenbilt
e1bd72b46c Prepare for 5.0.1 release 2013-10-18 13:51:30 -04:00
Jay Berkenbilt
cb1188e105 Instructions for building from pristine checkout 2013-10-18 13:50:33 -04:00
Jay Berkenbilt
a237e92445 Warn when -accessibility=n will be ignored
Also accept -accessibility=n with 256 bit keys even though it will be
ignored.
2013-10-18 10:45:15 -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
4229457068 Security: use a secure random number generator
If not available, give an error.  The user may also configure qpdf to
use an insecure random number generator.
2013-10-18 10:45:12 -04:00
Jay Berkenbilt
25687ddd71 Pass additional arguments from Windows config wrappers 2013-10-09 20:57:14 -04:00
Jay Berkenbilt
e19eb579b2 Replace some assertions with std::logic_error
Ideally, the library should never call assert outside of test code,
but it does in several places.  For some cases where the assertion
might conceivably fail because of a problem with the input data,
replace assertions with exceptions so that they can be trapped by the
calling application.  This commit surely misses some cases and
replaced some cases unnecessarily, but it should still be an
improvement.
2013-10-09 20:57:14 -04:00
Jay Berkenbilt
0bfe902489 Security: avoid pre-allocating vectors based on file data
In places where std::vector<T>(size_t) was used, either validate that
the size parameter is sane or refactor code to avoid the need to
pre-allocate the vector.
2013-10-09 20:57:14 -04:00
Jay Berkenbilt
10bceb552f Security: sanitize /W in xref stream
The /W array was not sanitized, possibly causing an integer overflow
in a multiplication. An analysis of the code suggests that there were
no possible exploits based on this since the problems were in checking
expected values but bounds checks were performed on actual values.
2013-10-09 20:57:07 -04:00
Jay Berkenbilt
3eb4b066ab Security: better bounds checks for linearization data
The faulty code was only used during explicit checks of linearization
data.  Those checks are not part of normal reading or writing of PDF
files.
2013-10-09 19:50:09 -04:00
Jay Berkenbilt
b097d7a81b Security: handle empty name in normalizeName 2013-10-09 19:50:09 -04:00
Jay Berkenbilt
eb1b1264b4 Security: fix potential multiplication overflow
Better sanity check inputs to bit stream reader
2013-10-09 19:50:09 -04:00
Jay Berkenbilt
c2e91d8ec3 Security: keep cur_byte pointing into bytes array 2013-10-09 19:50:07 -04:00
Jay Berkenbilt
b9fe85be28 Note about extra hash_V5 calls 2013-07-20 10:18:01 -04:00
Jay Berkenbilt
66e63b8667 Prepare 5.0.0 release 2013-07-10 12:29:13 -04:00
Jay Berkenbilt
2ab4924431 Update valgrid suppressions 2013-07-10 12:29:13 -04:00
Jay Berkenbilt
31b6e66cf1 Update doc for 5.0.0 2013-07-10 11:31:27 -04:00
Jay Berkenbilt
cee2592ed1 Change API/ABI and withdraw 4.2.0
4.2.0 was binary incompatible in spite of there being no deletions or
changes to any public methods.  As such, we have to bump the ABI and
are fixing some API breakage while we're at it.

Previous 4.3.0 target is now 5.1.0.
2013-07-10 11:30:13 -04:00
Jay Berkenbilt
f31e526d67 Prepare 4.2.0 release 2013-07-07 19:43:16 -04:00
Jay Berkenbilt
8bbefaf982 Update spelling checker word list 2013-07-07 19:43:16 -04:00
Jay Berkenbilt
b067c014b2 Replace - with -- in documentation
This is a cosmetic change since both are accepted.
2013-07-07 19:43:16 -04:00
Jay Berkenbilt
9adb6a8dfd Update for 4.2.0 2013-07-07 19:43:16 -04:00
Jay Berkenbilt
b84f57e56d Ignore broken DecodeParms for stream with no filters 2013-07-07 19:43:16 -04:00
Jay Berkenbilt
a2696ac271 Adjust to-do list 2013-07-07 19:43:16 -04:00
Jay Berkenbilt
91367239fd Add --show-npages option to qpdf 2013-07-07 19:43:16 -04:00
Jay Berkenbilt
adccedc02f Allow numeric range to be omitted qpdf --pages
Detect a missing page range and assume 1-z.
2013-07-07 19:43:16 -04:00
Jay Berkenbilt
88bacb6449 Fix QPDFObjGen constructor implementation 2013-07-07 19:43:01 -04:00
Jay Berkenbilt
212812d837 Fix errors reported by Coverity
Thanks to Jiri Popelka from Red Hat for sending the output of a
Coverity run over qpdf.
2013-07-07 15:36:51 -04:00
Jon Snell
66c88995fc Fix typo in qpdf-manual.xml
s/Controls handing of object streams./Controls handling of object streams./
2013-06-19 14:21:14 -04:00
Jay Berkenbilt
a85007cb0d Handle more broken files
Space rather than newline after xref, missing /ID in trailer for
encrypted file.  This enables qpdf to handle some files that xpdf can
handle.  Adobe reader can't necessarily handle them.
2013-06-15 12:40:01 -04:00
Jay Berkenbilt
a1d5a3e916 Retarget some items for 4.2.0 and 4.3.0
Bug fixes for 4.2.0 force additional interfaces, so move most of the
4.2.0 items to 4.3.0.
2013-06-14 21:36:22 -04:00
Jay Berkenbilt
16051788ed Handle /Outlines dictionary being a direct object
Even though this case is not valid according to the spec, it has been
seen, and caused an internal error.
2013-06-14 21:36:04 -04:00
Jay Berkenbilt
eae8370cd9 Add optional /Length key in crypt filter dictionary 2013-06-14 20:42:39 -04:00
Jay Berkenbilt
a3576a7359 Bug fix: handle generation > 0 when generating object streams
Rework QPDFWriter to always track old object IDs and QPDFObjGen
instead of int, thus not discarding the generation number.  Switch to
QPDF::getCompressibleObjGen() to properly handle the case of an old
object eligible for compression that has a generation of other than
zero.
2013-06-14 14:58:09 -04:00
Jay Berkenbilt
96eb965115 Use QPDFObjectHandle::getObjGen() where appropriate
In internal code and examples, replace calls to getObjectID() and
getGeneration() with calls to getObjGen() where possible.
2013-06-14 14:58:09 -04:00
Jay Berkenbilt
5039da0b91 Add QPDFObjectHandle::getObjGen()
This is safer than getObjectID() and getGeneration() for many uses.
2013-06-14 14:58:09 -04:00
Jay Berkenbilt
d88231e01e Promote QPDF::ObjGen to top-level object QPDFObjGen 2013-06-14 14:58:08 -04:00
Jay Berkenbilt
690d6031db Remove duplicated comment 2013-06-08 18:58:31 -04:00
Jay Berkenbilt
c660f74334 User suggestions from github issues 10 and 11 2013-06-02 16:10:53 -04:00
Jay Berkenbilt
f02c5f5e12 Final preparation for 4.1.0 release 2013-04-14 15:03:51 -04:00
Jay Berkenbilt
403bb68d33 Run spelling checker 2013-04-14 14:36:25 -04:00
Jay Berkenbilt
65c667eef9 Remove RPM spec file
Most Linux distributions include qpdf now, so there is no need to
distribute our own spec file.
2013-04-14 14:33:10 -04:00
Jay Berkenbilt
be72eab99b Update release notes for 4.1.0 2013-04-14 14:31:32 -04:00
Jay Berkenbilt
eb6f066296 Update 4.2.0 target 2013-04-04 14:13:51 -04:00
Jay Berkenbilt
2d02b3cc3d Add explicit int to double cast 2013-04-04 14:13:31 -04:00
Jay Berkenbilt
8e636ea680 Protect gcc diagnostic pragmas with gcc version
Versions prior to 4.6 didn't allow gcc diagnostic pragmas with push
and pop and to appear anywhere in the file.  Just let the warning be
there for those versions.
2013-03-27 17:36:28 -04:00
Jay Berkenbilt
e8ddac8950 Document casting policy 2013-03-25 14:37:25 -04:00
Jay Berkenbilt
1ec1b12864 Improve idea for corrupted stream handling 2013-03-17 13:16:14 -04:00
Jay Berkenbilt
77a35e0870 Retarget some items for 4.2.0 2013-03-16 22:04:36 -04:00