2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-09-19 08:39:09 +00:00
Commit Graph

1027 Commits

Author SHA1 Message Date
m-holger
9ce18e41f4
Merge pull request #979 from m-holger/const
In FUTURE make various QPDFObjectHandle methods const
2024-07-19 10:50:08 +01:00
m-holger
fe1fffe8db Change QPDF max_warnings into a hard limit
Throw damagedFile if max_warnings is exceeded. Change qpdf_fuzzer warnings limit to
limit to 500.
2024-07-18 16:50:08 +01:00
m-holger
7f2d76b78d Remove non-dictionary objects from pages tree 2024-07-16 14:35:32 +01:00
m-holger
edf3509b78 Treat corrupt JPEG streams as unfilterable 2024-07-04 17:06:42 +01:00
Jay Berkenbilt
598268f6ad Add setMaxWarnings rather than using conditional compilation 2024-07-03 15:44:44 +01:00
Jay Berkenbilt
65bd8bc57d Add DCT decompression config methods in favor of compile-time changes
As a rule, we should avoid conditional compilation is it always causes
code paths that are sometimes not even seen lexically by the compiler.
Also, we want the actual code being fuzzed to be as close as possible
to the real code. Conditional compilation is suitable to handle
underlying system differences.

Instead, favor configuration using callbacks or other methods that can
be triggered in the places where they need to be exercised.
2024-07-03 15:43:38 +01:00
m-holger
6d640c569a Add additional object id sanity checks
Ensure objects with impossibly large ids are ignored.
2024-07-02 01:16:23 +01:00
m-holger
d83cf43811 In PL_DCT add option to limit the size of uncompressed corrupt data
Also, apply limit in dct_fuzzer
2024-06-26 11:57:29 +01:00
m-holger
3468ce362d Bump version to 11.10.0 2024-06-26 11:57:02 +01:00
m-holger
9ed34aec10
Merge pull request #1216 from m-holger/fuzz
Amend fuzz future
2024-06-22 15:23:39 +01:00
m-holger
af66bf5670 Bump version to 11.9.2 2024-06-21 17:33:38 +01:00
m-holger
295f62f041
Merge pull request #1170 from m-holger/readxref
Refactor QPDF::parse_xrefEntry
2024-06-19 20:08:44 +01:00
m-holger
6ad16cd1fd In FUTURE make QPDFObjectHandle methods const and noexcept where possible 2024-06-19 10:34:01 +01:00
m-holger
f49f43fed1 Add separate FUTURE header file for QPDFObjectHandle 2024-06-19 10:34:01 +01:00
m-holger
9641626cae Refactor resolving of objects 2024-06-19 10:34:01 +01:00
m-holger
ce5b864c53
Merge pull request #1201 from m-holger/xref_stream
QPDF::processXRefStream
2024-06-18 20:21:39 +01:00
Jay Berkenbilt
167057411e Format code 2024-06-07 08:07:51 -04:00
Jay Berkenbilt
e8cfadf39f Bump version to 11.9.1 2024-06-07 07:42:08 -04:00
Jay Berkenbilt
d17f11e721 Make QPDF::updateObjectMaps iterative 2024-06-06 15:22:14 -04:00
m-holger
2b0c2da720 Refactor QPDF::processXRefStream
Change the processed Index array to a vector of <first object, number of
entries> pairs.
2024-05-22 18:53:30 +01:00
m-holger
7477ea7828 Add new private method QPDF::processXRefSize 2024-05-22 17:07:42 +01:00
m-holger
f74b28f0d1 Add new private method QPDF::processXRefW 2024-05-22 17:07:37 +01:00
m-holger
0186d60dcf Add new private method QPDF::processXRefIndex 2024-05-22 17:07:28 +01:00
m-holger
aa2e0d23f0 In QPDFWriter::writeLinearized use object table obj in call to getLinearizedParts 2024-03-08 10:41:24 +00:00
m-holger
97d78c75ff In QPDFWriter::writeLinearized use object table obj in call to optimize 2024-03-08 10:33:42 +00:00
m-holger
0df0d00c58 Add method QPDF::Writer::getCompressibleObjSet
Create set without creation of an intermediate vector.
2024-03-08 10:20:12 +00:00
m-holger
ae00ee6119 Replace QPDF::Writer::getObjectStreamData with getXRefTable 2024-03-08 10:10:31 +00:00
m-holger
ef3a8025fb In QPDFWriter replace map lenghts with ObjTable new_obj 2024-03-08 10:06:14 +00:00
m-holger
ccad589f7d In QPDFWriter replace map xref with new ObjTable new_obj 2024-03-08 10:05:57 +00:00
m-holger
2fa93e79b4 In QPDFWriter replace map object_to_object_stream with ObjTable obj 2024-03-08 09:59:56 +00:00
m-holger
84e25919cb In QPDFWriter replace map obj_renumber_no_gen with ObjTable obj 2024-03-08 09:36:47 +00:00
m-holger
8791b5f8d0 In QPDFWriter replace map obj_renumber with a new object table obj 2024-03-08 09:36:22 +00:00
m-holger
72bd486337 Refactor QPDF::parse_xrefEntry
Move reading of the entry from read_xrefTable to parse_xrefEntry.

Split parse_xrefEntry into two new methods read_xrefEntry and
read_bad_xrefEntry. read_xrefEntry is optimised for reading
correct entries. To handle incorrect entries it calls read_bad_xrefEntry,
which is largely unchanged from parse_xrefEntry.
2024-03-07 15:33:27 +00:00
Jay Berkenbilt
e362bce8e8 Merge branch 'jw' from #1146 into work 2024-02-17 14:15:48 -05:00
m-holger
4f54508f7f Refactor QPDFJob::doJSONObjects 2024-02-16 15:50:30 +00:00
m-holger
f0bc2f11ef Expose QPDFObjectHandle::writeJSON 2024-02-16 14:09:28 +00:00
m-holger
b9bc05356a Refactor QPDF::writeJSONStream
Use QPDF_Stream::writeStreamJSON.
Factor out the json_stream_data == qpdf_sj_file case.
2024-02-16 11:51:10 +00:00
m-holger
e2737ab646 Add new writeJSON methods
Create an alternative to getJSON to allow an object handle to be written as JSON without the overhead of creating a JSON object.
2024-02-16 10:51:25 +00:00
m-holger
9e90007a4a Add new private class JSON::Writer
Create a simple utility class for writing JSON to a pipeline.
2024-02-16 10:32:41 +00:00
Jay Berkenbilt
b1dad0de2a Fix previous fix to setting checkbox value (fixes #1056)
The code accepted values other than /Yes but still used /Yes as the
checked value instead of obeying the normal appearance dictionary.
2024-02-11 15:49:44 -05:00
m-holger
a41b789995 Add new method JSON::getDictItem 2024-01-15 15:02:52 +00:00
Jay Berkenbilt
5b2e543089 Honor repeated overlay/underlay 2024-01-11 06:13:57 -05:00
Jay Berkenbilt
6488b156f7 Fix deleted copy constructors for Config classes 2024-01-10 16:45:14 -05:00
Jay Berkenbilt
1ecdbc1e55 Bump version to 11.9.0 2024-01-10 16:45:13 -05:00
Jay Berkenbilt
9c723aeb56 Allow --file with --overlay and --underlay 2024-01-10 16:44:46 -05:00
Jay Berkenbilt
34f013c1be Allow --file and --range with --pages
Accept --file and --range as named parameters in additional to
allowing positional arguments. This is in preparation for adding
additional flags.
2024-01-10 16:44:17 -05:00
m-holger
8715d6a693 Tweak QPDF::replaceObject 2024-01-08 11:54:33 +00:00
Jay Berkenbilt
07f6c635a9 Bug fix: treat old generations of reused objects as null 2024-01-07 17:16:14 -05:00
Jay Berkenbilt
ebdd41e692 Spell check 2024-01-07 08:54:36 -05:00
Jay Berkenbilt
7cac433e2d Implement --set-page-labels and supporting API (fixes #939) 2024-01-05 17:12:12 -05:00