2833 Commits (dba48ac3d9454096e7afaa653cb510490c4fb8d2)

Author SHA1 Message Date
Luis Díaz Más dba48ac3d9 Fix warning on VS2008 7 years ago
Luis Díaz Más 603692a1d8 Copyright to Exiv2 authors 7 years ago
Luis Díaz Más c4cc019dff Hide -Wunused-variable issues by using the UNUSED() macro 7 years ago
Luis Díaz Más 94375034e6 Fix -Wsign-compare issues 7 years ago
Luis Díaz Más 18ded9ccf3 Use static version of libcurl.
Note that this will simplify the packaging/deployment
7 years ago
Luis Díaz Más 0bfa0168df Cleanup some of the PACKAGE_XXX variables and rely in the ones given by the project() command 7 years ago
Luis Díaz Más 980f2e9462 Use isnan(f) as an alternative to isinf() on __APPLE__ 7 years ago
Robin Mills 6d1c318fc6 Fixes in PngChunk::readRawProfile 7 years ago
Luis Díaz Más f5b40f3e82 Fix more issues in PngChunk::readRawProfile 7 years ago
Luis Díaz Más 847da051c0 Fix bug in PngChunk::readRawProfile
- Now it takes into account text.size_ when searching for a newline
char.
7 years ago
Luis Díaz Más 6b77e9f6c8 Do not use std::vector::data() which is not part of c++98 7 years ago
Luis Díaz Más 2ae0cffe18 isinf for Visual Studio versions previous to 2013 7 years ago
Luis Díaz Más 4161099b91 Fix warnings reported by MSVC 7 years ago
Luis Díaz Más da24df0ba0 snprintf versions for VS versions previous to 2015 7 years ago
Luis Diaz Mas 67e448669e Use -Wno-format-overflow when compiling value.cpp to skip false positive warning 7 years ago
Luis Díaz Más 597b17fff5 Simplify timegm.h and make it usable with MINGW 7 years ago
Dan Čermák 1e23238fa4 Fix memory leak in Params::getopt() 7 years ago
clanmills 3c42fdddeb Fix include <exiv2/exiv2.hpp> to include exiv2/config.h (and consequential changes)
Fix cltest.cpp and version.cpp to report MSVC 2017 in which _MSC_VER == 1910
7 years ago
Robin Mills 74bc0e0535 Changes for cross-platform getopt 7 years ago
Hombre a226d6a650 Fixing typo in cmakefiles and removing REGEX dependencie for Cygwin 7 years ago
Hombre 28da26f174 Adding MINGW32 toolchain support 7 years ago
Dan Čermák 7d9ed33bde Initialize DataBuf with 0s => fix valgrind error 7 years ago
Dan Čermák 9f1a5a1ebb [futils] Change signature of getEnv to take an int
While taking an EnVar as the parameter is more clear it has the
disadvantage, that passing anything outside of the range of the
enumeration is undefined behavior. The compiler could then optimize
the range check in getEnv away (perfectly legal due to UB), leading
to buffer overreads.
7 years ago
Dan Čermák 11df43be78 [types] Apply Safe::abs() in floatToRationalCast & gcd
Also check for infinity in floatToRationalCast as depending on the
compiler special values of floats are converted to either
LONGMAX/LONGMIN or +/-inf
7 years ago
Dan Čermák 2dacb19933 [safe_op] Add Safe::abs(), calculates absoulte value without UB
Add a drop-in replacement for std::abs which never produces
negative values and thereby never invokes undefined behavior.
7 years ago
Luis Diaz Mas 8b47a8efc1 Include timegh.h in file which needs it 7 years ago
Luis Diaz Mas a9c9451588 Remove localtime.c and any other trick to handle timegm 7 years ago
Luis Diaz Mas eb306fdbae Substitute malloc/free with new/delete 7 years ago
Luis Diaz Mas eefee8125b to_hex and from_hex removed from API 7 years ago
Luis Diaz Mas 41499b8ecd Use snprintf instead of sprintf in TimeValue::copy
- Replaced assert by enforce
7 years ago
Luis Diaz Mas 7d8edbe781 Remove more dead code 7 years ago
Luis Diaz Mas 00502eabdd Move mrwthumb to samples 7 years ago
Luis Diaz Mas e9a6597a48 Move xmpdump to samples 7 years ago
Luis Diaz Mas ac51fda7b5 Move crwparse to samples 7 years ago
Luis Diaz Mas 32b618b1c7 Move crwedit from exiv2lib to samples 7 years ago
Luis Diaz Mas f9b2784055 Remove utiltest.cpp that is not compiled 7 years ago
Luis Diaz Mas 00f86a8df4 Cleanup unused variable warnings 7 years ago
Luis Diaz Mas 6e244f31d3 Cleanup fallthrough warning + clang-format parseCommonTargets function 7 years ago
Dan Čermák 35b3e596ed Add overflow & overread checks to PngChunk::parseTXTChunk()
This function was creating a lot of new pointers and strings without
properly checking the array bounds. This commit adds several calls
to enforce(), making sure that the pointers stay within bounds.
Strings are now created using the helper function
string_from_unterminated() to prevent overreads in the constructor of
std::string.

This fixes #400
7 years ago
Dan Čermák 6da77e2c64 Add documentation for parameters of string_from_unterminated 7 years ago
Dan Čermák b127354429 Simplify string_from_unterminated by using strnlen() 7 years ago
clanmills ce516eddef Issue-374 7 years ago
Dan Čermák b12a868454 Add EXV_WARN_UNUSED_RESULT macro & add it to DataBuf::release()
EXV_WARN_UNUSED_RESULT is a conditional macro that expands to either
__attribute__((warn_unused_result)) on gcc & clang or to _Check_return
for MSVC
=> Compiler warns if the return value is ignored
7 years ago
Dan Čermák 1ab921cb83 Add two padding bytes to exifLongHeader to prevent overreads
in the following call:
getHeaderOffset (payload.pData_, payload.size_, (byte*)&exifLongHeader, 6);

getHeaderOffset would read 6 bytes from exifLongHeader, reading beyond the
bounds of the array => add 2 padding bytes to prevent overreads
7 years ago
Dan Čermák dbf90b976f Fix overread in memcmp in PngImage::doWriteMetadata()
memcmp() compares the read data from key with the provided string, but when
key.pData_ is shorter than the provided length, then memcmp can read beyond the
bounds of key.pData_
=> add custom compare function, which ensures that we never read more than
key.size_
7 years ago
Dan Čermák 8d5a3c7dd9 Remove buffer overread in tExtToDataBuf
The pointer p is advanced in the while loop to step over three '\n'.
However, its length is never reduced accordingly. => the length check in the
following for loop is invalid, as it permits overreading by the number of
characters that p was advanced by.
7 years ago
Dan Čermák 67dc3e691f [IptcData::printStructure] clang-format function 7 years ago
Dan Čermák b2c3b61abc [IptcData::printStructure] Remove buffer overrun
The loop condition will perform a range check correctly, but it will always
dereference bytes[i], even if i is too large and fails the second check.
=> move the bytes[i] == 0x1c check into a if, after the range check was
successfull
7 years ago
Dan Čermák 39399ac5e8 Remove memory leak in SshIo::SshImpl::getDataByRange
The buffer array is not deleted, when an exception is thrown
(happens for nBytes< 0).
=> use std::vector<char> instead
7 years ago
Dan Čermák 607b19111c [DataBuf] Replace wrong usage of release() with free() 7 years ago