aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QUtil.cc
AgeCommit message (Collapse)Author
2021-02-11Add autoconf test for localtime_rJay Berkenbilt
2021-02-10Minor clean up of Windows headersJay Berkenbilt
2021-02-09Add QUtil methods for dealing with PDF timestamp stringsJay Berkenbilt
2021-02-08Add QUtil::pipe_file and QUtil::file_providerJay Berkenbilt
2020-10-27Improve efficiency of number to string conversionJay Berkenbilt
2020-10-21Protect numeric conversion against user's locale (fixes #459)Jay Berkenbilt
2020-04-16Fix warnings reported by -Wshadow=local (fixes #431)Jay Berkenbilt
2020-04-06Don't include <cwchar> if not building with wcharJay Berkenbilt
2020-04-06Delegate random number generation to crypto provider (fixes #418)Jay Berkenbilt
2020-04-06Make random data provider code thread-safeJay Berkenbilt
This uses C++-11 thread-safe static initializers now.
2020-04-06Remove QUtil::srandomJay Berkenbilt
2020-04-04Allow qpdf to be built on systems without wchar_t (fixes #406)Jay Berkenbilt
2020-04-03Remove redundant methods in QUtilJay Berkenbilt
This was being saved until we had to break ABI.
2020-02-29Include header for wcslen (fixes #405)Jay Berkenbilt
2020-01-14Pull wmain -> main code from qpdf.cc into QUtil.ccJay Berkenbilt
2020-01-14Add error detection for read_lines_from_file(FILE*)Jay Berkenbilt
2020-01-13QUtil::read_lines_from_file: optional EOL preservationJay Berkenbilt
2020-01-13Refactor QUtil::read_lines_from_fileJay Berkenbilt
This commit adds the preserve_eol flags but doesn't implement EOL preservation yet.
2019-11-09Allow odd/even modifiers in numeric range (fixes #364)Jay Berkenbilt
2019-08-31Add remove_file and rename_file to QUtilJay Berkenbilt
2019-06-22In shippable code, favor smart pointers (fixes #235)Jay Berkenbilt
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-22Add QUtil::read_file_into_memoryJay Berkenbilt
This code was essentially duplicated between test_driver and standalone_fuzz_target_runner.
2019-06-22Rename QUtil::strcasecmp to QUtil::str_compare_nocase (fixes #242)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-05-16Fix Windows memory error (fixes #330)Jay Berkenbilt
2019-04-21Support Unicode in filenames (fixes #298)Jay Berkenbilt
2019-03-11"_setmode" and "_stricmp" are not available on Borland C++Builder, neither ↵Thorsten Schöning
the classic one nor newer ones based on CLANG.
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-17Move remaining existing transcoding to QUtilJay Berkenbilt
2019-01-11Add configure option AVOID_WINDOWS_HANDLEJay Berkenbilt
If set, we avoid using Windows I/O HANDLE, which is disallowed in some versions of the Windows SDK, such as for Windows phones. QUtil::same_file will always return false in this case. Only applies to Windows builds.
2019-01-06Add WinAnsi and MacRoman encodingJay Berkenbilt
2019-01-06Refactor QUtil::utf8_to_asciiJay Berkenbilt
2019-01-06Move utf8_to_utf16 into QUtilJay Berkenbilt
2019-01-04Add QUtil::utf8_to_asciiJay Berkenbilt
2018-12-22Move numrange code from qpdf.cc to QUtil.ccJay Berkenbilt
Also move tests to libtests.
2018-08-14New exception class QPDFSystemError (fixes #221)Jay Berkenbilt
2018-06-21QUtil::toUTF16Jay Berkenbilt
2018-02-04Fix setLineBuf for bsd (fixes #177)Jay Berkenbilt
Use 0 instead of NULL in a cast.
2018-01-15Fixes for clangJay Berkenbilt
2018-01-14Add QUtil::hex_decodeJay Berkenbilt
2018-01-14Allow trailing . in numeric token (fixes #165)Jay Berkenbilt
2017-08-29Detect integer overflow/underflowJay Berkenbilt
2017-08-11Find xref without PCREJay Berkenbilt
2017-08-05QUtil::strcasecmpJay Berkenbilt
2017-07-30Allow reading command-line args from files (fixes #16)Jay Berkenbilt