Commit Graph

39 Commits

Author SHA1 Message Date
Michael R Sweet
63a7a2cdbd
Add unit tests for new pdfioFileGetCatalog API (Issue #67)
Fix pdfioDictGetString to convert (formerly) encrypted binary strings to
regular strings.
2024-06-24 11:46:15 -04:00
Michael R Sweet
7330cc35ba
Defer object/value decryption to after the object is loaded (Issue #42) 2023-12-14 16:02:26 -05:00
Michael R Sweet
5d760e7315
Update some debug printfs. 2023-12-13 12:48:31 -05:00
Michael R Sweet
34dbf6c2fe
Documentation cleanup. 2023-12-05 13:49:58 -05:00
Michael R Sweet
4f10021e7e
Fix denial-of-service attack when reading corrupt PDF files. 2023-02-03 20:39:04 -05:00
Michael R Sweet
64d306a322
Cleanup. 2022-07-06 08:47:52 -04:00
Michael R Sweet
f4b8983c61
Implement pdfioDictIterateKeys API (Issue #31) 2022-06-27 10:17:00 -04:00
Michael R Sweet
a431d7806f
Fix a few stack/buffer overflow bugs discovered by Bart, Steffan, and Mark from
the Radboud University NL (thanks!)

- Add depth argument to all value read functions that recurse
- Add depth argument to page tree loading code
- Validate xref stream sizes individually to avoid out-of-bounds access to local
  xref buffer.
2021-11-29 17:46:56 -05:00
Michael R Sweet
2f0d622873
Save work on resolving PDF loading issues with random PDFs using different encryption methods and line endings. 2021-11-01 21:30:46 -04:00
Michael R Sweet
9d121335f5
Make sure we free memory used for binary data. 2021-10-31 08:30:08 -04:00
Michael R Sweet
790cd440ea
Fix up copying objects from unencrypted to AES-encrypted documents (still looks
like there are some issues with strings in dicts)
2021-10-25 21:22:59 -04:00
Michael R Sweet
dd56317635
Need object when reading/writing encrypted PDFs (to decrypt/encrypt strings),
RC4 writing is now working, AES-128 needs work, AES-256 hasn't been done yet.
2021-10-23 18:08:16 -04:00
Michael R Sweet
543364dfa2
More efficiently implement reading of integers vs. indirect references.
"testpdfio filename.pdf objnum" now shows object value if there is no stream.

Clean up debugging printfs.
2021-08-23 14:31:54 -04:00
Michael R Sweet
d62faa51e1
Implement date value support (Issue #13) 2021-07-07 22:06:25 -04:00
Michael R Sweet
63c0fc1926
Fix some coverity-reported issues. 2021-06-09 09:14:57 -04:00
Michael R Sweet
a698b9c1a2
API cleanup, more work on documentation. 2021-06-07 08:34:30 -04:00
Michael R Sweet
1ea2b7514a
Rework the color space support.
Start work on PNG file reader.
2021-06-05 11:28:32 -04:00
Michael R Sweet
246c2e4b41
Rename as PDFio for consistency.
Add PDFio logo image.

Move documentation to "doc" subdirectory.
2021-05-30 07:10:44 -04:00
Michael R Sweet
a18b8fd606
Switch to using double for numbers, since they are also used to record lengths
and other potentially large contents.
2021-05-29 21:16:21 -04:00
Michael R Sweet
35d22705fa
Implement pdfioObjCopy and pdfioPageCopy, with tests. 2021-05-29 20:00:48 -04:00
Michael R Sweet
fb853dadda
Fix some issues with the core file writing code.
Add test images to the unit tests.
2021-05-28 10:41:21 -04:00
Michael R Sweet
548ff7d119
Initial writing support. 2021-05-16 11:39:05 -04:00
Michael R Sweet
18853ca3d5
Increase token buffer to 256 bytes, to avoid overflow scenarios.
Add _pdfioTokenFlush to manually flush the token buffer.

Add more debug printfs.
2021-05-10 17:37:57 -04:00
Michael R Sweet
cfb5ca0ddc
Rework error/debug output. 2021-05-10 08:40:52 -04:00
Michael R Sweet
5f43761537
Initial support for reading pages dictionary. 2021-05-08 22:50:18 -04:00
Michael R Sweet
9a919d478f
Rework token reading to be separate from the PDF file so we can add support
for compressed object streams.
2021-05-08 07:38:44 -04:00
Michael R Sweet
923409ceff
Save work on PNG predictors. Apparently object streams are also a common thing
for newer Acrobat so we'll need to implement those, too.
2021-05-07 19:51:38 -04:00
Michael R Sweet
d2a0484d93
Rework debug functions, start xref stream support. 2021-05-06 09:51:48 -04:00
Michael R Sweet
c0b18a7e4f
Fix pdfioStringCreate - was returning a char ** instead of a char *, causing
crashes/corruption.

Optimize dict allocation/sorting.

Add more values that are displayed by the testpdfio unit test program.
2021-05-05 13:51:42 -04:00
Michael R Sweet
4abb91ca24
Save work on loading object dictionaries - have a memory issue someplace. 2021-05-04 21:31:58 -04:00
Michael R Sweet
59ef6b48ed
Add some debug output, "debug" make target.
Fix loading of dicts, trailer.
2021-05-04 12:59:10 -04:00
Michael R Sweet
a5468b1b87
Implement value/array/dict reading, refactor indirect references. 2021-05-04 10:34:17 -04:00
Michael R Sweet
e107b94c83
Work on token parsing. 2021-05-01 17:50:52 -04:00
Michael R Sweet
e6dbb256f1
Add an Xcode project and fix some Clang-reported issues. 2021-05-01 07:36:19 -04:00
Michael R Sweet
8031e31abb
Do some cleanup for the array copy implmentation.
Add binary string accessors for dictionaries.

Add pdfioDictCopy implementation.
2021-04-30 08:21:21 -04:00
Michael R Sweet
e2e2192ea9
Save work. 2021-04-27 21:22:34 -04:00
Michael R Sweet
253717248c
pdfio_dict_t implementation 2021-04-25 20:12:52 -04:00
Michael R Sweet
899feb15c7
Start filling out internal APIs. 2021-04-16 21:09:43 -04:00
Michael R Sweet
c2610f2dd0
Fill out basic API functions. 2021-04-16 20:41:46 -04:00