m-holger
336d783325
Move calculations from QPDF::getObjectCount to Objects::next_id
2024-10-09 11:55:29 +01:00
m-holger
9e03dc54cc
Add new method Objects::swap
2024-10-09 11:39:17 +01:00
m-holger
83443c116d
Make ObjCache of inner class of QPDF::Objects and rename to Entry
2024-10-09 11:09:18 +01:00
m-holger
b5a5780019
Make Xref_table an inner class of QPDF::Objects
2024-10-09 09:53:57 +01:00
m-holger
a3f693c8f9
Move private methods in QPDF_objects to QPDF::Objects
2024-10-09 08:58:57 +01:00
m-holger
2015f71c7d
Add new inner class to QPDF::Objects
2024-10-07 14:18:59 +01:00
m-holger
c916dcf973
Add new protected inline method Pipeline::next
...
Also, tidy pipeline constructors and make subclasses final where possible.
2024-10-06 15:10:13 +01:00
m-holger
43a88e1d28
Tweak #1287 comments
2024-09-27 11:58:46 +01:00
m-holger
1796365713
Merge branch 'main' into mslichao/capifreebuf
2024-09-27 11:31:55 +01:00
m-holger
50d385c858
Merge pull request #1274 from m-holger/meta
...
Add new commands --remove-metadata and --remove-info
2024-09-27 11:26:34 +01:00
Chao Li(VISION)
f6ae1ff16a
Rename to qpdf_oh_free_buffer
2024-09-20 04:53:32 +00:00
Chao Li(VISION)
8c1cde4ec3
Add C API qpdf_free_buffer to release memory allocated by stream data functions
2024-09-19 12:21:49 +00:00
m-holger
cb7180b1ba
Move QPDF::ObjCache::end_before_space etc to Xref_table
...
Also, delay adjustments for compressed objects until needed by
linearization checks.
2024-09-18 10:25:38 +01:00
m-holger
0f0747b3ae
Refactor QPDF::getXRefTable
2024-09-18 10:25:38 +01:00
m-holger
98c14e7740
Refactor QPDF::checkLinearizationInternal
2024-09-18 10:25:38 +01:00
m-holger
c0020cb17d
Change Xref_table::table to std::vector
...
Temporarily disable 3 specific-bugs tests. Remove 'xref size mismatch'
test.
2024-09-18 10:25:38 +01:00
m-holger
d64b14912d
Move QPDF::readTrailer to QPDF::Xref_table
2024-09-18 10:25:38 +01:00
m-holger
3ddc51a9dc
Move QPDF::resolveXRefTable to QPDF::Xref_table
2024-09-18 10:25:38 +01:00
m-holger
a4db9b3149
Move QPDF::read_xref to QPDF::Xref_table
2024-09-18 10:25:37 +01:00
m-holger
f30a5eb05a
Move QPDF::read_xrefStream to QPDF::Xref_table
2024-09-18 10:25:37 +01:00
m-holger
253d3aee8f
Move QPDF::read_xrefEntry to QPDF::Xref_table
2024-09-18 10:25:37 +01:00
m-holger
3fbff84594
Move QPDF::reconstruct_xref to QPDF::Xref_table
...
Also, when recovering trailer from xref streams, pick the last valid
trailer encountered rather than the first.
2024-09-18 10:25:37 +01:00
m-holger
1e072e223a
Move QPDF::insertXrefEntry etc to QPDF::Xref_table
2024-09-18 10:25:37 +01:00
m-holger
0ac37bc956
Add new class QPDF::Xref_table
2024-09-18 10:25:37 +01:00
m-holger
f8e6274a2e
Move QPDF inner class definitions to new QPDF_private.hh
2024-09-18 10:25:37 +01:00
m-holger
0afaaea22a
Deprecate QPDFObjectHandle::isInitialized and remove from library
2024-09-17 09:59:00 +01:00
m-holger
5a33c75b98
Add QPDFObjectHandle::operator bool
2024-09-17 09:59:00 +01:00
m-holger
61f7d97b20
Merge pull request #1283 from m-holger/fuzz
...
Fix #1242
2024-09-17 00:19:52 +01:00
m-holger
75091093fe
Merge pull request #1280 from m-holger/streams
...
Tidy QPDF_Stream
2024-09-16 19:52:24 +01:00
m-holger
9ba6e070a1
Fix #1242
...
Ensure QPDF m->all_pages and invalid_page_found are reset if
getAllPagesInternal throws an exception.
Fixes fuzz case 71624.
2024-09-16 16:04:43 +01:00
m-holger
258343fcc9
In QPDF::readToken change input parameter to InputSource&
2024-09-05 15:23:28 +01:00
m-holger
20edfb3f91
In QPDF::damagedPDF change input parameter to InputSource&
2024-09-05 15:13:30 +01:00
m-holger
83e0f8da88
Tidy QPDF_Stream
...
1. Make class final
2. Pass og parameter by value
3. Properly initialize qpdf and og
Also, tweak QPDF::replaceObject to allow stream replacement without
violating the requirement that streams must always be indirect objects.
Also, remove QPDF::reserveStream as it does not do what the name implies
and having this as a separate methods does not aid code readability.
2024-09-04 16:00:57 +01:00
m-holger
8ed10d71ea
In qpdf_fuzzer and dct_fuzzer add a scan limit for Pl_DCT
2024-08-25 17:03:26 +01:00
m-holger
8cb9bce780
Add new commands --remove-metadata and --remove-info
2024-08-25 13:10:11 +01:00
m-holger
0b3debaf86
Merge pull request #1253 from m-holger/pl_t
...
Refactor Pl_QPDFTokenizer
2024-08-21 18:29:55 +01:00
m-holger
06001ed25b
Refactor the creation of unresolved objects
...
Create unresolved objects only for objects in the xref table (except during
parsing of the xref table). Do not add indirect nulls into the the object
cache as the result of a cache miss during a call to getObject except
during parsing or creation/updating from JSON. To support this behaviour,
add new private methods getObjectForParser and getObjectForJSON.
As a result of this change, dangling references are treated as direct nulls
rather than indirect nulls.
2024-08-06 12:22:09 +01:00
m-holger
3bab4cf394
Refactor Pl_RunLength::decode
...
Buffer output locally.
Add qpdf_fuzzer test case.
2024-08-03 15:52:45 +01:00
m-holger
2bb9e06d1e
In qpdf_fuzzer add a memory limit for Pl_Flate
2024-07-28 19:54:38 +01:00
m-holger
986a253cdd
Overload QPDFTokenizer::findEI to take a InputSource&
2024-07-27 18:27:49 +01:00
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