25 Commits

Author SHA1 Message Date
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
1e33878506 Fix conversion of nul-containing strings to binary.
Move key length checks to a common place.
2021-11-02 09:12:43 -04:00
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
d5173d14da Fix some Coverity-detected issues. 2021-10-08 13:49:48 -04:00
6745f785b7 Fix bug with xref stream with no index.
Fix bug with pdfiOStreamPeek not appending new stream data to buffer.

Add more debug printfs for values.
2021-08-24 13:50:57 -04:00
a3de05cf0e Increase size of value buffer. 2021-08-23 19:37:33 -04:00
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
d62faa51e1 Implement date value support (Issue #13) 2021-07-07 22:06:25 -04:00
6f02bdd301 Initial Visual Studio support. 2021-06-21 11:39:06 -04:00
a698b9c1a2 API cleanup, more work on documentation. 2021-06-07 08:34:30 -04:00
246c2e4b41 Rename as PDFio for consistency.
Add PDFio logo image.

Move documentation to "doc" subdirectory.
2021-05-30 07:10:44 -04:00
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
35d22705fa Implement pdfioObjCopy and pdfioPageCopy, with tests. 2021-05-29 20:00:48 -04:00
548ff7d119 Initial writing support. 2021-05-16 11:39:05 -04:00
4bb81417a8 Start fleshing out writing/copying interfaces. 2021-05-15 09:29:37 -04:00
cfb5ca0ddc Rework error/debug output. 2021-05-10 08:40:52 -04:00
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
d2a0484d93 Rework debug functions, start xref stream support. 2021-05-06 09:51:48 -04:00
4abb91ca24 Save work on loading object dictionaries - have a memory issue someplace. 2021-05-04 21:31:58 -04:00
59ef6b48ed Add some debug output, "debug" make target.
Fix loading of dicts, trailer.
2021-05-04 12:59:10 -04:00
a5468b1b87 Implement value/array/dict reading, refactor indirect references. 2021-05-04 10:34:17 -04:00
f5c9aef7da Finish value copy, delete, and write methods. 2021-04-30 07:42:25 -04:00
e2e2192ea9 Save work. 2021-04-27 21:22:34 -04:00
899feb15c7 Start filling out internal APIs. 2021-04-16 21:09:43 -04:00
c2610f2dd0 Fill out basic API functions. 2021-04-16 20:41:46 -04:00