aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf
AgeCommit message (Collapse)Author
2019-09-20Prepare 9.0.1 releaseJay Berkenbilt
2019-09-20Correct reversed Rectangle coordinates (fixes #363)Jay Berkenbilt
2019-09-20Warn for duplicated dictionary keys (fixes #345)Jay Berkenbilt
2019-09-01Prepare 9.0.0 releaserelease-qpdf-9.0.0Jay Berkenbilt
2019-08-31Add --replace-input option (fixes #321)Jay Berkenbilt
2019-08-31refactor: split write_outfile and do_split_pagesJay Berkenbilt
2019-08-28Detect stream in object stream, fixing fuzz 16214Jay Berkenbilt
It's detected in QPDFWriter instead of at parse time because I can't figure out how to construct a test case in a reasonable time. This commit moves the fuzz file into the regular test suite for a QTC coverage case.
2019-08-27Fix fuzz issue 15387 (overflow checking xref size)Jay Berkenbilt
2019-08-24Include password match information in show encryptionJay Berkenbilt
2019-08-24Track separately whether password was user/owner (fixes #159)Jay Berkenbilt
2019-08-24Add flags to control zlib compression level (fixes #113)Jay Berkenbilt
2019-08-23Pass offset and length to ParserCallbacks::handleObjectJay Berkenbilt
2019-08-22Test for direct, rather than resolved nulls in parserJay Berkenbilt
Just because we know an indirect reference is null, doesn't mean we shouldn't keep it indirect.
2019-08-22Remove array null flatteningJay Berkenbilt
For some reason, qpdf from the beginning was replacing indirect references to null with literal null in arrays even after removing the old behavior of flattening scalar references. This seems like a bad idea.
2019-08-20Accept extraneous space before xref (fixes #341)Jay Berkenbilt
2019-08-20Accept extraneous space after stream keyword (fixes #329)Jay Berkenbilt
2019-08-20Improve invalid name token warning messageJay Berkenbilt
This message used to only appear for PDF >= 1.2. The invalid name is valid for PDF 1.0 and 1.1. However, since QPDFWriter may write a newer version, it's better to detect and warn in all cases. Therefore make the warning more informative.
2019-08-20Handle invalid name tokens symmetrically for PDF < 1.2 (fixes #332)Jay Berkenbilt
2019-08-19Attempt to repair /Type key in pages nodes (fixes #349)Jay Berkenbilt
2019-07-04Change list to vector for outline helpers (fixes #297)Thorsten Schöning
This change works around STL problems with Embarcadero C++ Builder version 10.2, but std::vector is more common than std::list in qpdf, and this is a relatively new API, so an API change is tolerable. Thanks to Thorsten Schöning <6223655+ams-tschoening@users.noreply.github.com> for the fix.
2019-06-23Treat all linearization errors as warningsJay Berkenbilt
This also reverts the addition of a new checkLinearization that distinguishes errors from warnings. There's no practical distinction between what was considered an error and what was considered a warning.
2019-06-23Handle invalid encryption Length (fixes #333)Jay Berkenbilt
2019-06-23Allow set*EncryptionParameters before filename iset (fixes #336)Jay Berkenbilt
2019-06-22Fix --completion-* args to work from AppImage (fixes #285)Jay Berkenbilt
2019-06-22qpdf: exit 3 for linearization warnings without errors (fixes #50)Jay Berkenbilt
2019-06-22Add QUtil::read_file_into_memoryJay Berkenbilt
This code was essentially duplicated between test_driver and standalone_fuzz_target_runner.
2019-06-22Remove broken QPDFTokenizer::expectInlineImageJay Berkenbilt
2019-06-22Rename QUtil::strcasecmp to QUtil::str_compare_nocase (fixes #242)Jay Berkenbilt
2019-06-21Fix bugs found by fuzz testsJay Berkenbilt
* Several assertions in linearization were not always true; change them to run time errors * Handle a few cases of uninitialized objects * Handle pages with no contents when doing form operations * Handle invalid page tree nodes when traversing pages
2019-06-21Add smaller image streams file for testingJay Berkenbilt
2019-06-21Fix sign and conversion warnings (major)Jay Berkenbilt
This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with MSVC. This significantly reduces the likelihood of potential crashes from bogus integer values. There are some parts of the code that take int when they should take size_t or an offset. Such places would make qpdf not support files with more than 2^31 of something that usually wouldn't be so large. In the event that such a file shows up and is valid, at least qpdf would raise an error in the right spot so the issue could be legitimately addressed rather than failing in some weird way because of a silent overflow condition.
2019-06-21Add new integer accessors to QPDFObjectHandleJay Berkenbilt
2019-06-21Appearance streams: some floating point values were truncatedJay Berkenbilt
Bounding box X coordinates could be truncated, causing them to be off by a fraction of a point. This was most likely not visible, but it was still wrong.
2019-06-15As a test suite, run stand-alone fuzzer on seed corpusJay Berkenbilt
Temporarily skip fuzz tests on Windows. There are Windows-specific failures to address later.
2019-06-15Add test files from oss-fuzz bugs (fixes #335)Jay Berkenbilt
2019-06-15Give up reading objects with too many consecutive errorsJay Berkenbilt
2019-06-10Commit forgotten test filesJay Berkenbilt
2019-06-09Handle empty DecodeParams array for (fixes #331)Jay Berkenbilt
On read, ignore /DecodeParms when empty list; on write, delete it. Some files have been found that include an empty list for /DecodeParms, but this is not technically compliant with the spec, and the only sensible interpretation is to treat it as if there are no decode parameters.
2019-05-18Prepare 8.4.2 releaseJay Berkenbilt
2019-04-28Prepare 8.4.1 releaserelease-qpdf-8.4.1Jay Berkenbilt
2019-04-28Improve Unicode filename testingJay Berkenbilt
Remove dependency on the behavior of perl for reliable creation of Unicode file names on Windows.
2019-04-28Remove stray commentJay Berkenbilt
2019-04-22Fix typoJay Berkenbilt
2019-04-21Compare versions between CLI and libraryJay Berkenbilt
2019-04-21Add --remove-page-labels option (fixes #317)Jay Berkenbilt
2019-04-21Add --keep-files-open-threshold (fixes #288)Jay Berkenbilt
2019-04-21Support Unicode in filenames (fixes #298)Jay Berkenbilt
2019-04-21Document that linearize disables qdf (fixes #312)Jay Berkenbilt
2019-04-21Revert preservations of outlines with --split-pagesJay Berkenbilt
The preservation of outlines didn't provide very useful behavior anyway as it copied all outlines but most didn't work. This implementation also caused a very significant performance hit and so is being reverted until a proper solution can be coded. The eventual solution will not be compatible with the reverted solution anyway, so it's best not to leave this in.
2019-03-11Don't open more than 50 files.Thorsten Schöning
Embarcadero C++Builder doesn't support more than 50 files open at the same time for legacy 32 Bit apps, which makes a test fail trying to open more than that many files. This changes the number of open files for that test to far less to make the test succeed. Alternatively one could reduce the hard coded number of 200 in QPDF itself, which I didn't do currently because it needs adoption of manuals etc. and is something which needs to be discussed with the author of QPDF. I guess chances are better to get the test changed upstream. This fixes #288: https://github.com/qpdf/qpdf/issues/288