summaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_linearization.cc
AgeCommit message (Collapse)Author
2013-10-18Security: replace operator[] with atJay Berkenbilt
For std::string and std::vector, replace operator[] with at. This was done using an automated process. See README.hardening for details.
2013-10-10Replace some assertions with std::logic_errorJay Berkenbilt
Ideally, the library should never call assert outside of test code, but it does in several places. For some cases where the assertion might conceivably fail because of a problem with the input data, replace assertions with exceptions so that they can be trapped by the calling application. This commit surely misses some cases and replaced some cases unnecessarily, but it should still be an improvement.
2013-10-10Security: avoid pre-allocating vectors based on file dataJay Berkenbilt
In places where std::vector<T>(size_t) was used, either validate that the size parameter is sane or refactor code to avoid the need to pre-allocate the vector.
2013-10-10Security: better bounds checks for linearization dataJay Berkenbilt
The faulty code was only used during explicit checks of linearization data. Those checks are not part of normal reading or writing of PDF files.
2013-06-15Handle /Outlines dictionary being a direct objectJay Berkenbilt
Even though this case is not valid according to the spec, it has been seen, and caused an internal error.
2013-06-14Use QPDFObjectHandle::getObjGen() where appropriateJay Berkenbilt
In internal code and examples, replace calls to getObjectID() and getGeneration() with calls to getObjGen() where possible.
2013-06-14Promote QPDF::ObjGen to top-level object QPDFObjGenJay Berkenbilt
2013-03-04Remove all old-style casts from C++ codeJay Berkenbilt
2012-09-06Reset state in QPDF::calculateLinearizationDataJay Berkenbilt
This makes it possible to use two different writers to write linearized files from the same QPDF object.
2012-06-24Fix and test support for files >= 4 GBJay Berkenbilt
2012-06-22Use qpdf_offset_t in place of off_t in public APIs.Jay Berkenbilt
off_t is used internally only when needed to talk to standard libraries. This requires that the "long long" type be supported by the compiler.
2012-06-20ABI change: fix use of off_t, size_t, and integer typesJay Berkenbilt
Significantly improve the code's use of off_t for file offsets, size_t for memory sizes, and integer types in cases where there has to be compatibility with external interfaces. Rework sections of the code that would have prevented qpdf from working on files larger than 2 (or maybe 4) GB in size.
2011-12-28Don't declare any PCRE objects static.Jay Berkenbilt
2011-08-11enhance PointerHolder so that it can explicitly be told to use delete [] ↵Jay Berkenbilt
instead of delete, thus making it useful to run valgrind over qpdf during its test suite
2011-05-07remove unused offset variableJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@1056 71b93d88-0707-0410-a8cf-f5a4172ac649
2011-01-31handle files with object 0 as a real objectJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@1049 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-10-01setOutputStreamsJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@1035 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-09-24convert file to a PointerHolder<InputSource> so it could be either a file or ↵Jay Berkenbilt
a buffer; also fix a bug in BufferInputSource::seek git-svn-id: svn+q:///qpdf/trunk@1030 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-20categorize all error messages and include object information if availableJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@829 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-12do DLL_EXPORT only in header files and only at the class or top-level ↵Jay Berkenbilt
function level git-svn-id: svn+q:///qpdf/trunk@796 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-09-26removed qexc; non-compatible ABI changeJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@709 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-09-14fix problems or otherwise improve code based on issues raised by KlocworkJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@690 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-08-06stick DLL_EXPORT in front of every public method of every public classJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@688 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-07-13Fix a few compiler errors reported correctly my MSVC 9.0.Jay Berkenbilt
Fix libtests test suites to pass on Windows, mostly by dealing with ascii vs. binary and NL vs. CRNL change ($td->NORMALIZE_NEWLINES). Convert some test suites to use fread instead of read. PCRE.hh: define PCRE_STATIC if on Windows. Provide cross-platform function for getting current time instead of using time(0). git-svn-id: svn+q:///qpdf/trunk@678 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-02-21fix many typos in comments and stringsJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@651 71b93d88-0707-0410-a8cf-f5a4172ac649
2008-05-04missing header files for gcc 4.3Jay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@607 71b93d88-0707-0410-a8cf-f5a4172ac649
2008-04-29update release date to actual daterelease-qpdf-2.0Jay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@599 71b93d88-0707-0410-a8cf-f5a4172ac649