2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-01 18:00:52 +00:00
Commit Graph

1372 Commits

Author SHA1 Message Date
Thorsten Schöning
8f06da7534 Change list to vector for outline helpers (fixes #297)
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-07-03 20:08:47 -04:00
Jay Berkenbilt
4db1de97ce Convert some cases of logic_error to runtime_error
There were a few cases that could be caused by invalid input rather
than bugs in the code which were throwing logic_error instead of
runtime_error.
2019-06-25 12:43:06 -04:00
Jay Berkenbilt
201e8798d7 Convert previously overlooked static cast to QIntC 2019-06-25 12:43:06 -04:00
Jay Berkenbilt
0ae344d002 Add fuzzers to exercise specific pipeline classes 2019-06-23 15:37:21 -04:00
Jay Berkenbilt
43ff34b49c Update TODO 2019-06-23 14:57:10 -04:00
Jay Berkenbilt
04f45cf652 Treat all linearization errors as warnings
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-23 13:45:45 -04:00
Jay Berkenbilt
0b45dfd3b1 TODO updates 2019-06-22 21:52:50 -04:00
Jay Berkenbilt
c4e286ac79 Fix typo in manual 2019-06-22 20:57:33 -04:00
Jay Berkenbilt
c5ed1b8075 Handle invalid encryption Length (fixes #333) 2019-06-22 20:57:33 -04:00
Jay Berkenbilt
551dfbf697 Allow set*EncryptionParameters before filename iset (fixes #336) 2019-06-22 20:57:33 -04:00
Jay Berkenbilt
ed62be888c Fix --completion-* args to work from AppImage (fixes #285) 2019-06-22 17:12:01 -04:00
Jay Berkenbilt
7bd38a3eb3 Provide error message in Windows crypto code (fixes #286)
Thanks to github user zdenop for supplying some additional
error-handling code.
2019-06-22 17:12:01 -04:00
Jay Berkenbilt
6c39aa8763 In shippable code, favor smart pointers (fixes #235)
Use PointerHolder in several places where manually memory allocation
and deallocation were being used. This helps to protect against memory
leaks when exceptions are thrown in surprising places.
2019-06-22 16:57:52 -04:00
Jay Berkenbilt
1240047528 Try to use pkg-config to find external dependencies (fixes #324) 2019-06-22 16:57:52 -04:00
Jay Berkenbilt
f2ef161261 Override umask on install (fixes #326) 2019-06-22 16:57:52 -04:00
Jay Berkenbilt
85a3f95a89 qpdf: exit 3 for linearization warnings without errors (fixes #50) 2019-06-22 16:57:51 -04:00
Jay Berkenbilt
557bd3c261 Start 9.0.0 release notes 2019-06-22 16:57:51 -04:00
Jay Berkenbilt
a5814d9302 ChangeLog: fix errors in previous entries 2019-06-22 16:57:51 -04:00
Jay Berkenbilt
ed8166b21e TODO/README-maintainer cleanup 2019-06-22 12:02:39 -04:00
Jay Berkenbilt
2001cbc8a1 Add fuzz reminder to release checklist 2019-06-22 10:37:03 -04:00
Jay Berkenbilt
1bde5c68a3 Add QUtil::read_file_into_memory
This code was essentially duplicated between test_driver and
standalone_fuzz_target_runner.
2019-06-22 10:14:25 -04:00
Jay Berkenbilt
658b5bb3be QPDFWriter: clean up overloaded functions
In a small number of cases, it makes sense to replace an overloaded
function with a function that takes a default argument. We can do this
now because we've already broken binary compatibility since the last
release.
2019-06-22 10:13:27 -04:00
Jay Berkenbilt
46304befec Use clang for sanitizers
Clang seems to be slightly stricter than gcc.
2019-06-22 10:13:27 -04:00
Jay Berkenbilt
79f6b4823b Convert remaining public classes to use Members pattern
Have classes contain only a single private member of type
PointerHolder<Members>. This makes it safe to change the structure of
the Members class without breaking binary compatibility. Many of the
classes already follow this pattern quite successfully. This brings in
the rest of the class that are part of the public API.
2019-06-22 10:13:27 -04:00
Jay Berkenbilt
864a546af6 Build with -fvisibility=hidden when supported 2019-06-21 22:29:31 -04:00
Jay Berkenbilt
97833d7cf3 configure: add missing checking messages 2019-06-21 22:29:31 -04:00
Jay Berkenbilt
ade8e2cd7f Remove unused gcc-linux make rules
I don't want to maintain them or make anyone think they should be used.
2019-06-21 22:29:31 -04:00
Jay Berkenbilt
45dac410b5 Remove broken QPDFTokenizer::expectInlineImage 2019-06-21 22:29:31 -04:00
Jay Berkenbilt
25dd3c6750 Remove QPDF::copyForeignObject with unused parameter 2019-06-21 22:29:31 -04:00
Jay Berkenbilt
c6cfd64503 Rename QUtil::strcasecmp to QUtil::str_compare_nocase (fixes #242) 2019-06-21 22:29:31 -04:00
Jay Berkenbilt
bd8918fffc Fix up TODO for ABI changes 2019-06-21 22:29:31 -04:00
Jay Berkenbilt
848351f1fc Add missing #include <cstring> 2019-06-21 22:29:31 -04:00
Jay Berkenbilt
83b3c34185 Mention QIntC in README-Maintainer 2019-06-21 22:04:45 -04:00
Jay Berkenbilt
793d987b5f Update qpdf_fuzzer to increase coverage 2019-06-21 17:56:24 -04:00
Jay Berkenbilt
b07ad6794e Fix bugs found by fuzz tests
* 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-21 17:56:24 -04:00
Jay Berkenbilt
a35d4ce9cc Fix bounds error in utf16_to_utf8 conversion 2019-06-21 17:40:24 -04:00
Jay Berkenbilt
2320714339 Clean up fuzzer installation and add test files
* Create the seed corpus in the build directory
* Don't assume all fuzzers share an options file
2019-06-21 17:39:53 -04:00
Jay Berkenbilt
ed7f2a6c76 Add smaller image streams file for testing 2019-06-21 17:39:53 -04:00
Jay Berkenbilt
2c81eec45e Re-enable fuzzer testing in Windows 2019-06-21 17:32:35 -04:00
Jay Berkenbilt
1763957cbc Remove integer type task from TODO 2019-06-21 13:17:45 -04:00
Jay Berkenbilt
6fca27995e Update casting policy in the documentation 2019-06-21 13:17:45 -04:00
Jay Berkenbilt
cc2e8853b5 Enable int warnings by default
Now that there aren't any more...
2019-06-21 13:17:21 -04:00
Jay Berkenbilt
63a643a3c7 Remove implicit conversion from int/pointer to bool
This fixes cases of warning C4800 from msvc
2019-06-21 13:17:21 -04:00
Jay Berkenbilt
d71f05ca07 Fix sign and conversion warnings (major)
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-21 13:17:21 -04:00
Jay Berkenbilt
f40ffc9d63 Pl_Flate: constructor's out_bufsize is now unsigned int
This is the type we need for the underlying zlib implementation.
2019-06-21 13:17:21 -04:00
Jay Berkenbilt
da30764bce Change QPDFObjectHandle::pipeStreamData's encode_flags type
Change from unsigned long to int since we pass enumerated type values
to this field.
2019-06-21 13:17:21 -04:00
Jay Berkenbilt
3608afd5c5 Add new integer accessors to QPDFObjectHandle 2019-06-21 13:17:21 -04:00
Jay Berkenbilt
42306e2ff8 QUtil: add unsigned int/string functions 2019-06-21 13:17:21 -04:00
Jay Berkenbilt
a66828caff New safe type converters in QIntC 2019-06-21 13:17:21 -04:00
Jay Berkenbilt
bdf29ca33e Add 32-bit Linux build to CI 2019-06-21 13:17:21 -04:00