summaryrefslogtreecommitdiffstats
path: root/libtests
AgeCommit message (Collapse)Author
2019-06-22Add missing #include <cstring>Jay Berkenbilt
2019-06-21Fix bounds error in utf16_to_utf8 conversionJay 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-21QUtil: add unsigned int/string functionsJay Berkenbilt
2019-06-21New safe type converters in QIntCJay Berkenbilt
2019-03-11Fix json serialization for {x | -1 < x < 1} (fixes #308)Jay Berkenbilt
JSON serialization was preserving the value as presented, but JSON doesn't accept decimal values without a 0 before the decimal point.
2019-01-27Convert pages to form XObjectsJay Berkenbilt
Support conversion of pages to form XObjects and placement of form XObjects on pages.
2019-01-27Move rectangle transformation into QPDFMatrixJay Berkenbilt
2019-01-17Add QUtil::possible_repaired_encodingsJay Berkenbilt
2019-01-17Add status-reporting transcoders to QUtilJay Berkenbilt
2019-01-17QUtil::analyze_encodingJay Berkenbilt
2019-01-17Bidirectional transcoding for win, mac, pdf, utf8, utf16Jay Berkenbilt
2019-01-06Add WinAnsi and MacRoman encodingJay Berkenbilt
2019-01-06Refactor QUtil::utf8_to_asciiJay Berkenbilt
2019-01-04Add QUtil::utf8_to_asciiJay Berkenbilt
2019-01-01Add Matrix class under QPDFObjectHandleJay Berkenbilt
2019-01-01Transformation matrixJay Berkenbilt
2018-12-25JSON::serialize -> unparseJay Berkenbilt
Unparse is admittedly strange, but I'd rather be strange and consistent, and everything else in the qpdf library uses unparse to serialize. (If you're reading this, the convention of using "unparse" comes from the "clu" programming language.)
2018-12-22Move numrange code from qpdf.cc to QUtil.ccJay Berkenbilt
Also move tests to libtests.
2018-12-22Add simple JSON serializerJay Berkenbilt
2018-08-14New exception class QPDFSystemError (fixes #221)Jay Berkenbilt
2018-08-13Catch exceptions as const references (fixes #236)Jay Berkenbilt
This fix allows qpdf to compile/test cleanly with gcc 8.
2018-08-05ClosedFileInputSource: add method to keep file openJay Berkenbilt
During periods of intensive operation on a specific file, this method can reduce the overhead of repeated open/close operations.
2018-06-23Fix typoJay Berkenbilt
2018-06-22Windows test workaroundJay Berkenbilt
2018-06-22Add ClosedFileInputSourceJay Berkenbilt
ClosedFileInputSource is an input source that keeps the file closed when not reading it.
2018-06-21QUtil::toUTF16Jay Berkenbilt
2018-06-21Label qutil test outputJay Berkenbilt
2018-05-05buffer test: fix memory leak in test codeJay Berkenbilt
Forgot to delete a buffer in the test driver. There was no memory leak or memory error in any installed code.
2018-03-06Pl_Buffer starts in a ready stateJay Berkenbilt
2018-02-04Fix link order (fixes #176)Jay Berkenbilt
Specify qpdf libraries before external ones. Specify LDFLAGS before libraries. This should eliminate remaining cases of qpdf builds favoring previously installed versions.
2018-01-14Add QUtil::hex_decodeJay Berkenbilt
2018-01-14Use correct link directory order (fixes #158)Jay Berkenbilt
Make sure to link from the source tree before linking from the system. In many environments, this is necessary to allow a newly built qpdf to link properly instead of trying to link or resolve libraries from an older installed version.
2018-01-14Add Pl_TIFFPredictorJay Berkenbilt
2018-01-14Add signed support to BitStream and BitWriterJay Berkenbilt
2018-01-14Rename png_filter -> predictorsJay Berkenbilt
2017-12-26Add tests for new PNG filtersJay Berkenbilt
2017-12-25PNG filter test imagesJay Berkenbilt
2017-12-25Correct errors in PNG filters and make use from libraryJay Berkenbilt
2017-09-08Pl_DCT: Use custom source and destination managers (fixes #153)Jay Berkenbilt
Avoid calling jpeg_mem_src and jpeg_mem_dest. The custom destination manager writes to the pipeline in smaller chunks to avoid having the whole image in memory at once. The source manager works directly with the Buffer object. Using customer managers avoids use of memory source and destination managers, which are not present in older versions of libjpeg still in use by some Linux distributions.
2017-08-29Replace all atoi calls with QUtil::string_to_intJay Berkenbilt
The latter catches underflow/overflow.
2017-08-29Detect integer overflow/underflowJay Berkenbilt
2017-08-22Fix compiler warnings for clang/mac OS XJay Berkenbilt
2017-08-21Implement Pl_DCT pipelineJay Berkenbilt
Additional testing is added in later commits to be supported by additional changes in the library.
2017-08-19Implement Pl_RunLength pipelineJay Berkenbilt
2017-08-11Remove PCREJay Berkenbilt
2017-08-11Implement findFirst and findLast in InputSourceJay Berkenbilt
Preparing to refactor some pattern searching code to use these instead of their own memchr loops. This should simplify the code that replaces PCRE.
2017-07-30Allow reading command-line args from files (fixes #16)Jay Berkenbilt
2017-07-30Detect input file = output file (fixes #29)Jay Berkenbilt
2016-01-24Use RM_WS_ONLY_LINES in testThorsten Schöning
Some compilers output extra newlines in some cases.