m-holger
8cd50e0e3e
Fix QPDF::tableSize
...
Apply temporary fix to deal with fuzz case 68915.
(Error is an integer overflow which would immediately cause a runtime error
as a result of a call to QInitCQIntC::to_size.)
2024-05-21 12:50:19 +01:00
m-holger
e85b98b7e8
Guard against object id == std::numeric_limits<int> in QPDF::insertReconstructedXrefEntry
2024-04-30 12:38:02 +01:00
m-holger
972cbf103d
In QPDF::processXRefStream avoid inserting objed id 0 into the xref table
2024-04-30 10:38:59 +01: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
8791b5f8d0
In QPDFWriter replace map obj_renumber with a new object table obj
2024-03-08 09:36:22 +00:00
Jay Berkenbilt
7caa9ddf5a
Format code
2024-02-04 16:12:01 -05:00
m-holger
f0343565ed
Tighten checks for invalid indirect references during xref reconstruction
2024-01-17 14:11:57 +00:00
m-holger
6e3b7982db
Fix incorrect handling of invalid negative object ids
...
Fix two errors introduced in #1110 and #1112 . Since
#1110 , encountering the invalid indirect reference #1110
-2147483648 n R produces an integer underflow which, if
undetected, immediately trigger a logic error. Since
#1112 , object -1 0 R may be incorrectly identified as
an earlier generation of itself and deleted,
invalidating a live iterator.
2024-01-17 10:39:06 +00:00
m-holger
e28625144d
Tweak QPDF::getCompressibleObjGens
2024-01-08 10:55:51 -05:00
Jay Berkenbilt
adb866efd3
Fix error from older gcc versions
2024-01-08 10:55:51 -05:00
m-holger
8715d6a693
Tweak QPDF::replaceObject
2024-01-08 11:54:33 +00:00
m-holger
5641832e54
Tweak QPDF::read_xref
2024-01-08 11:43:57 +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
df61f3a6c6
Improve getCompressibleObjGens fix to handle gen > 0
2024-01-07 15:22:04 -05:00
m-holger
ba477e0b33
Tune QPDF::getCompressibleObjGens
...
Change set visited to std::vector<bool>
2024-01-07 17:39:40 +00:00
m-holger
6195499598
Tune QPDF::getCompressibleObjGens
...
Swap front and back, and change queue from list to vector
2024-01-07 16:39:03 +00:00
Jay Berkenbilt
55b0024899
Format code
2024-01-06 17:23:45 -05:00
Jay Berkenbilt
7b3fff15a9
QPDF.cc: remove unused includes
2024-01-06 17:19:16 -05:00
Jay Berkenbilt
2994f9cf4c
Attempt to find xref streams during recovery ( fixes #1103 )
2024-01-06 16:51:03 -05:00
Jay Berkenbilt
7c0fdf8510
Format code, bump clang-format version to 18
2023-12-22 21:45:10 -05:00
m-holger
ddad5ad53e
In QPDF::pipeStreamData use unique_ptr as heap
2023-11-26 13:06:12 +00:00
m-holger
0dee397075
In QPDF::pipeStreamData read buffer in a single read
2023-11-26 12:26:57 +00:00
Jay Berkenbilt
98014ec98a
Fix error with stream recovery ( fixes #1042 )
2023-10-07 13:29:10 -04:00
m-holger
fb504ce913
Fix #1028
2023-09-05 17:22:34 +01:00
Jay Berkenbilt
bfbd97b938
Spell check
2023-09-03 14:07:30 -04:00
m-holger
b0c3ea2bb6
Refactor test for /Pages object in QPDF::copyForeignObject
...
Test for missing object before accessing obj_copier.object_map.
2023-09-03 13:41:11 +01:00
m-holger
ac32dbc313
Reserve foreign /Page objects in QPDF::copyForeignObject
...
Ensure that links to foreign pages are not broken provided that the page is
subsequently copied.
2023-08-25 14:06:42 +01:00
m-holger
ad73bbcd90
Change QPDF::reserveObjects to reserve indirect nulls to reserve foreign objects
2023-08-25 13:30:55 +01:00
m-holger
52539544c4
Modify QPDF::replaceReserved to allow replacing indirect nulls
2023-08-25 12:37:24 +01:00
m-holger
fedd42191f
Change QPDF::copyForeignObject to return a null object when called with a /Pages object ( fixes #1011 )
2023-08-25 12:10:51 +01:00
Jay Berkenbilt
3f9b5053ba
Format code
2023-07-09 09:59:55 -04:00
m-holger
ba3953f1bf
Tune QPDF::readObject
2023-07-08 16:32:07 +01:00
m-holger
5754ab8b39
Tune QPDF::readObjectInStream
2023-07-08 16:32:00 +01:00
m-holger
aabd3f6f9b
Add private method QPDF::validateStreamLineEnd
2023-07-08 16:31:57 +01:00
m-holger
ef866d68cd
In QPDF::readStream remove variable done
2023-07-08 16:31:50 +01:00
m-holger
c422b918b1
Add new private method QPDF::readStream
2023-07-08 16:31:44 +01:00
m-holger
2643ed4dd9
Add new private method QPDF::readTrailer()
2023-07-08 01:28:15 +01:00
m-holger
bee726609c
Remove redundant parameters from QPDF::readObject
2023-07-07 20:37:13 +01:00
m-holger
2bf7359e35
Add new private method QPDF::readObjectInStream
2023-07-07 20:14:59 +01:00
m-holger
098b98c889
Tidy QPDF::read_xrefTable(qpdf_offset_t xref_offset)
2023-07-04 19:59:09 +01:00
m-holger
8e6974710c
Add private method QPDF::insertFreeXrefEntry
2023-07-04 19:59:09 +01:00
m-holger
250a736482
Remove parameter overwrite from QPDF::processXRefStream
2023-07-04 19:59:09 +01:00
m-holger
769a4915e8
Add new private method QPDF::insertReconstructedXrefEntry
2023-07-04 19:59:09 +01:00
Jay Berkenbilt
071fe4a0e5
Merge pull request #985 from m-holger/members
...
Change JSONHandler::m to std::unique_ptr and declare Members in implementation file
2023-06-17 11:57:02 -04:00
Jay Berkenbilt
0b538ec877
Merge pull request #982 from m-holger/cltidy
...
Apply various Clang-Tidy rules
2023-06-17 11:29:21 -04:00
Jay Berkenbilt
d3c444a7fb
Merge pull request #980 from m-holger/readobject
...
Avoid unnecessary copying of stream dictionary in QPDF::readObject
2023-06-17 10:54:45 -04:00
m-holger
8b05c550b3
Fix doc typos
2023-06-17 14:38:20 +01:00
m-holger
7bc0f1d828
Code tidy - Clang-Tidy rule modernize-use-emplace
2023-06-09 15:42:11 +01:00
m-holger
320bbb9854
Code tidy - Clang-Tidy rule modernize-return-braced-init-list
2023-06-09 15:35:56 +01:00