Commit Graph

29 Commits

Author SHA1 Message Date
Michael R Sweet
e6588d3960 Backport more changes from master. 2025-04-24 12:29:53 -04:00
Michael R Sweet
8f706b9fe7 Backport reading improvements/bug fixes from master. 2025-04-24 12:19:11 -04:00
Michael R Sweet
1237599dea Clean up some compiler warnings. 2025-02-22 19:48:09 -05:00
Sergey Vlasov
acf27d29c6 Fix undefined behavior 2025-01-18 13:56:25 +03:00
Michael R Sweet
026f653e07 Fix loading of last 1024 bytes for small PDF files (Issue #87) 2025-01-17 16:58:33 -05:00
Michael R Sweet
e882622233 Fix locale support (Issue #61) 2024-01-27 18:22:16 -05:00
Michael R Sweet
f4aa951165 Fix _pdfioFileSeek with whence==SEEK_CUR
Fix seek offset after trailer.

Look at the last 1k of the file to find the startxref marker.
2023-12-12 12:24:49 -05:00
Michael R Sweet
34dbf6c2fe Documentation cleanup. 2023-12-05 13:49:58 -05:00
Michael R Sweet
ddd984215a Save work (debug printfs, etc.) 2023-11-15 08:38:47 -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
6432187dea Fix sporadic test suite failures caused by greedy whitespace removal in token
reader.

Update read code to handle signal/temporary failures.

Add some more useful debug messages for the encryption code.

Eliminate more warnings from Clang.
2021-10-31 11:12:54 -04:00
Michael R Sweet
d6746c08a4 Add pdfioFileCreateOutput API (Issue #21) 2021-09-27 07:41:50 -04:00
Michael R Sweet
6aa5585eb4 Fix some compressed stream bugs. 2021-08-30 10:55:45 -04:00
Michael R Sweet
466cb473d1 Fix _pdfioFileRead/Seek to fix test suite-reported error loading an object. 2021-06-10 10:58:07 -04:00
Michael R Sweet
ee5fcc2a4a Fix Coverity-discovered issues. 2021-06-04 10:56:23 -04:00
Michael R Sweet
35ea209c73 Initial unit tests for writing a PDF file. 2021-05-16 12:36:44 -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
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
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
4b05ca6436 Token parsing code. 2021-05-01 22:38:11 -04:00
Michael R Sweet
e107b94c83 Work on token parsing. 2021-05-01 17:50:52 -04:00
Michael R Sweet
f5f0e190b5 Initial working pdfioFileOpen, test program. 2021-05-01 11:50:17 -04:00
Michael R Sweet
d13364a4fd Implement pdfioFileOpen reading of xref table. 2021-05-01 11:41:43 -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
e2e2192ea9 Save work. 2021-04-27 21:22:34 -04:00
Michael R Sweet
11588ce2f5 Save work on low-level file I/O. 2021-04-26 10:42:01 -04:00
Michael R Sweet
253717248c pdfio_dict_t implementation 2021-04-25 20:12:52 -04:00
Michael R Sweet
7a6659038b Initial checkin. 2021-04-10 08:00:52 -04:00