m-holger
b0e34486fd
Rename Pl_Flate::setMemoryLimit to memory_limit and add accessor
2025-02-05 13:23:27 +00:00
m-holger
a496dbe8b2
In SF_FlateLzwDecode::setDecodeParms return early on failure
...
The stream filter is only used if the stream is filterable, therefore
there is no point continuing to set decode parameters once it is recognized
that the stream is not filterable.
2025-02-05 13:01:39 +00:00
m-holger
a8631e255e
Code tidy SF_FlateLzwDecode
2025-02-05 12:32:52 +00:00
m-holger
2b470ff77c
Remove 'this->' in SF_FlateLzwDecode.cc
2025-02-05 11:58:46 +00:00
m-holger
f5cac93ac6
Merge pull request #1349 from m-holger/fuzz
...
Fix bugs found during fuzzing
2025-02-05 00:09:35 +00:00
m-holger
43fa1b2755
Refine QPDFParser error handling
...
Fail if a bad token is encountered while parsing an array or dictionary
with more than 100,000 elements.
Fixes oss-fuzz case 388571629.
2025-02-04 15:08:55 +00:00
m-holger
671b6e2ecf
Limit memory usage of Pl_Runlength during fuzzing
...
Fixes oss-fuzz case 394129398.
Issue arose from chaining multiple runlength filters and inflating a
compressed stream of ~100 bytes to several gigabytes.
There is no obvious fix without imposing an arbitrary implementation limit
and therefore potentially excluding valid PDF files.
2025-02-04 15:08:55 +00:00
Jay Berkenbilt
ad3ecadf05
Merge pull request #1346 from jberkenbilt/zopfli
...
Add zopfli support
2025-02-04 07:09:16 -05:00
Jay Berkenbilt
133da3b6d3
Add zopfli support ( fixes #1323 )
...
This requires a special build option.
2025-02-04 06:17:34 -05:00
Jay Berkenbilt
0ddc4abd03
Merge pull request #1345 from jberkenbilt/fix-qdf-output-file
...
Fix qdf output file
2025-02-03 08:25:16 -05:00
Jay Berkenbilt
a2fc5b522e
fix-qdf: accept optional output file ( fixes #1330 )
2025-02-03 06:42:22 -05:00
Jay Berkenbilt
9cf9620131
fix-qdf: replace hard-coded std::cout with member variable
2025-02-03 06:42:22 -05:00
m-holger
a5cab082fa
Merge pull request #1348 from m-holger/pr1347
...
jidanni cli.rst update
2025-02-03 10:51:59 +00:00
m-holger
e793abe3d5
Run generate_auto_jobs with #1347
2025-02-03 10:17:49 +00:00
積丹尼 Dan Jacobson
22dacf7b3c
Update cli.rst adding vital "PDF" words
...
(So folks working offline won't go for hours dreaming they can overlay *.txt files, until after the finish writing the txt file, and try it, and it doesn't work.)
2025-02-03 08:33:02 +08:00
m-holger
756b5e30d1
Merge pull request #1341 from m-holger/hc
...
Update copyrights
2025-02-02 23:59:17 +00:00
m-holger
e9887aaa9d
Update various 'QPDF's to 'qpdf'
2025-02-02 22:24:19 +00:00
m-holger
c7a47caf8f
Update copyrights
2025-02-02 22:24:19 +00:00
m-holger
542a4282da
Merge pull request #1344 from m-holger/fuzz
...
Fix bugs found during fuzzing
2025-02-02 22:21:33 +00:00
m-holger
70f7af78e1
Fix QPDFOutlineObjectHelper loop detectection
...
Check for direct outline items.
Fixes oss-fuzz case 389339260.
2025-02-02 21:52:47 +00:00
m-holger
7a2ef59230
In Pl_ASCII85Decoder do not run finish after a runtime_error
...
Fixes oss-fuzz cases 376305073, 389974979 and 391974927.
2025-02-02 21:52:47 +00:00
m-holger
e324d36b95
Merge pull request #1343 from m-holger/i1335a
...
Refine xref reconstruction (fixes #1335 )
2025-02-02 21:48:45 +00:00
m-holger
ca3ea2e305
Refine xref reconstruction ( fixes #1335 )
...
When recovering XRef streams, start with the stream with the largest
/Size rather than the largest offset.
Also, if reconstruction fails to find a trailer with a valid /Root entry
search for a root object.
2025-02-02 21:14:08 +00:00
m-holger
aa583f293a
Merge pull request #1340 from m-holger/i1286
...
Change QPDFWriter stream_decode_level default to qpdf_dl_generalized (fixes #1286 )
2025-02-02 21:03:04 +00:00
m-holger
d9e230bf4c
Merge pull request #1342 from m-holger/i1329
...
CLI reject flags with parameters (fixes #1329 )
2025-02-02 13:14:27 +00:00
m-holger
985cdf91e6
CLI reject flags with parameters ( fixes #1329 )
2025-02-01 12:34:57 +00:00
m-holger
1d8dc489d4
Merge pull request #1266 from m-holger/ostream
...
Add new object stream test case
2025-01-31 20:10:27 +00:00
m-holger
c026b51196
Add new object stream test case
...
Exercise stream containing objects with no white-space between them.
2025-01-31 19:22:06 +00:00
m-holger
e7dcbe93ca
In QPDFWriter::generateID change empty deterministic_id_data to a
...
runtime error
2025-01-31 16:52:31 +00:00
m-holger
718b14008b
Change QPDFWriter stream_decode_level default to qpdf_dl_generalized
...
Also, fix disabling of preserve_encryption to be ignore
stream_decode_level, but disable preserve_encryption if compress_streams is
false.
Fixes #1286
2025-01-31 16:09:07 +00:00
m-holger
ff0affd81d
In QPDFWriter::willFilterStream on runtime error on first attempt retry
...
without filtering
2025-01-31 15:34:02 +00:00
m-holger
642a1110ed
Code tidy QPDFWriter::willFilterStream
2025-01-31 15:34:02 +00:00
Jay Berkenbilt
018cf0eb54
Merge pull request #1284 from cbwoyak/zlib_find_library
...
Use NAMES keyword in find_library call
2025-01-29 07:50:22 -05:00
m-holger
712a471184
Merge pull request #1116 from m-holger/ca
...
Add copy annotation test
2025-01-28 23:20:35 +00:00
m-holger
73af7567d1
Add copy annotation test
...
Test fixing /P entry.
2025-01-28 16:26:21 +00:00
m-holger
bde5a446ab
Merge pull request #1307 from m-holger/pages
...
Fix QPDF::getAllPagesInternal warning
2025-01-28 15:59:52 +00:00
m-holger
b079859c4c
Merge pull request #1306 from m-holger/foreign
...
Fix QPDF::copyForeignObject warning
2025-01-28 15:58:27 +00:00
Jay Berkenbilt
622592fed2
Merge pull request #1339 from jberkenbilt/stefre-doc-patches
...
Stefre doc patches
2025-01-28 07:16:41 -05:00
Jay Berkenbilt
e571478901
Run generate_auto_jobs with doc typo fixes
2025-01-28 06:52:51 -05:00
Jay Berkenbilt
c5febb2cd6
Merge branch 'patch-1' of https://github.com/StefRe/qpdf into main
2025-01-28 06:52:08 -05:00
m-holger
cc95f4731e
Fix QPDF::copyForeignObject warning
...
Provide correct obj_gen and offset.
2025-01-28 11:01:18 +00:00
m-holger
b7bf9f3d3c
Fix QPDF::getAllPagesInternal warning
...
Provide correct obj_gen.
2025-01-28 10:15:15 +00:00
m-holger
ef891178f8
Merge pull request #1338 from m-holger/qpdf-11-revert
...
Exclude #1272 , #1289 , #1297 and #1301 from qpdf 11.10
2025-01-27 22:34:59 +00:00
Jay Berkenbilt
740dd509b0
Fix yaml format in .readthedocs.yaml
2025-01-27 18:31:12 +00:00
m-holger
0d5c57c151
Revert "Merge pull request #1272 from m-holger/xref_table"
...
This reverts commit ff2a78f579ebdd06b417e34260a17dba06e71137, reversing
changes made to 8f54319f7a6514110f4b05cbbf1cb1c9fc8cb6a0.
2025-01-16 16:40:08 +00:00
m-holger
f1800410b6
Revert "Merge pull request #1289 from m-holger/fuzz"
...
This reverts commit 0e92cf6bf399249c603c3d0212e898fd29e71fcd, reversing
changes made to 7d34b89a69e8e89c098dd373442f7df809c28eff.
2025-01-16 16:36:48 +00:00
m-holger
efb2e8f613
Revert "Merge pull request #1297 from m-holger/qpdf_objects"
...
This reverts commit c648b9a018105a3c30b3e7f3c5f8a058d3ddd92c, reversing
changes made to 12b67a3227df6b6df3a4f5f098e11cce173ff7d5.
2025-01-16 16:15:11 +00:00
m-holger
4bf09ff1cd
Revert "Merge pull request #1301 from m-holger/typo"
...
This reverts commit 54cf0e519c49e3fb44c7ca1de95a1fffbafc211c, reversing
changes made to c648b9a018105a3c30b3e7f3c5f8a058d3ddd92c.
2025-01-16 16:13:27 +00:00
Jay Berkenbilt
531f6877a8
Tweak test files to work around fixed ghostscript bug
...
Ghostscript 10.0.2 failed to handle the files changed in this commit,
but ghostscript 10.0.4 handles them fine as do earlier versions. These
files all have hybird xref in the form of a file with an xref table
appended with a section that has an xref stream. They all have
/PageLabels pointing to 107 0 R in the original file, with 107 higher
than the highest object. The spec says that this should be treated as
null, which results in /PageLabels null, which results in ghostscript
errors in that version. While ghostscript 10.0.2 may be handling the
file incorrectly, the file does something that's not really kosher,
and it's easier to fix the files, which had not been changed since the
very first open source release of qpdf, than to try to work around the
issue.
This was discovered with the GitHub actions runner was bumped to
Ubuntu 24.04, which contains the buggy version of ghostscript. I was
not able to find a specific ghostscript issue that addressed this, but
the problem went away in either 10.0.3 or 10.0.4.
Commenting out /PageLabels without changing offsets was a pragmatic
move to avoid having to regenerate the xref tables manually. I just
had to manually edit the binary xref stream to change the offset of
one item (the new object 1), which I put at the end to avoid breaking
other things.
2025-01-05 17:29:03 -05:00
Jay Berkenbilt
ef9616775e
Fix headers for rijndael.h
2024-12-14 11:02:33 -05:00