5670 Commits (d96b619515e39c16f0d563562a6ddc45e9c56e9c)
 

Author SHA1 Message Date
Luis Diaz Mas d96b619515 Add braces for the main functions in the new source files at samples 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 ad004498a2 Cleanup 'comparison between signed & unsigned integer' warning 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
Luis Diaz Mas 0d9065274e Remove redefinition of UNUSED 7 years ago
D4N a93cb04361
Merge pull request #407 from D4N/fix_400
Fix issue #400 (overreads in PngChunk::parseTXTChunk())
7 years ago
Dan Čermák dadd1d19f9 Add reproducer for #400 to the test suite 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
Luis Diaz Mas 2540981aae travis-osx: do not install libssh openssl (already installed) 7 years ago
Luis Diaz Mas eedc4aef5f Add doc indicating how to consume exiv2 with CMake 7 years ago
Luis Diaz Mas 17ad919ec2 CMake: Add RPATH configuration for Linux/Solaris
Note that this RPATH setup is following a recommendation from the CMake
documentation:
https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling#recommendations
7 years ago
Luis Diaz Mas cefe0e5b0a conan: Use the same conan version in all the platforms (1.6.1) 7 years ago
clanmills ce516eddef Issue-374 7 years ago
Robin Mills 20d21ec3dc #350 7 years ago
Luis Diaz Mas 8ba9422ba3 travis: Enable coverage reports in gcc build
* I also had to update the conan version to fix some issues in CI.
* Codecov reports are now added to the README.md and to each PR.
7 years ago
Luis Diaz Mas 6521f7c4f9 cmake: new option to enable compilations with coverage flags
Note that this will only work with gcc and clang.
7 years ago
Luis Diaz Mas 3d35b93fc0 Skip test 1054 unless timezone is UTC 7 years ago
Luis Diaz Mas 59585fa3af [Travis] export TZ=UTC before running tests
This is needed in some tests which are using exiv2json.
It seems that during metadata conversion, the dates are converted from the
original timezone (which seems to be saved in xmp) into the local time zone.
7 years ago
Luis Diaz Mas 145f8fc456 Port redmine issues from the bash test suite to the python one.
* Port redmine issue 1024
 * Port redmine issue 1026
 * Port redmine issue 1040
 * Port redmine issue 1044
 * Port redmine issue 1053
 * Port redmine issue 1054 (not finished yet; I found some issues there)
 * Port redmine issue 1058
 * Port redmine issue 1062
 * Port redmine issue 1080
 * Port redmine issue 1108
 * Port redmine issue 1112
 * Port redmine issue 1114
 * Port redmine issue 1122
 * Port redmine issue 1140
 * Port redmine issue 1144
 * Port redmine issue 1145
 * Port redmine issue 1153
 * Port redmine issue 1155
 * Port redmine issue 1166
 * Port redmine issue 1167
 * Port redmine issue 1170
 * Replace escaped chars in 1054
 * Add brackets in exiv2json::main()
 * Link all sample apps against exiv2lib
 * Changes in 1054
 * test 1054: fix dates depending on Local time
 * Do not run make with VERBOSE=1
 * Use system_tests.path
 * Fix windows issues with quotes
 * Use system_tests.path
 * Use itertools to simplify test code
7 years ago
Robin Mills 4e47c20f97
Merge pull request #389 from piponazo/clcache
Enable clcache usage and use it in appveyor
7 years ago
Luis Díaz Más 5eee072089 Enable clcache usage and use it in appveyor
* [appveyor] Install clcache with nuget
* [appveyor] Keep clcache in the appveyor jobs
* [appveyor] Print clcache stats after compiling the project
* Use CLCACHE_PATH env variable to find clcache
7 years ago
Dan Čermák e67910a669 [tests] Change name of test for #365 and #366
Issues got a CVE assigned
7 years ago
D4N 24ef91fcf9
Merge pull request #380 from D4N/misc_issues_fix
Fix various memory issues and enable ASAN for the test suite
7 years ago
Dan Čermák 664e93c057 [travis] Enable ASAN for the test suite 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
Dan Čermák 1b74db8f51 [types] Add DataBuf::free()
DataBuf::release() easily cause memory leaks, when the return value is
ignored. free() provides the desired behavior, when the internal data should
just be deleted and not used further.
7 years ago
D4N 505e2417e4
Merge pull request #379 from D4N/fix_378
Fix for #378
7 years ago
Dan Čermák 81b6d36c90 [webp] Enforce minimum read size in decodeChunks
The size parameter is only checked for upper bounds, but not for lower.
If it is too small, then created dataBuf will be too small and overflow in one
of the subsequent memcpy() calls.

This fixes #378 / CVE-2018-14046
7 years ago
Dan Čermák f522cbf460 [testsuite] Add reproducer for #378/CVE-2018-14046 to the testsuite 7 years ago
Luis Díaz Más 6a203c70c0 Include missing unused.h header in convert.cpp 7 years ago
Luis Díaz Más bb9ce23e76 Set EXV_HAVE_XMP_TOOLKIT correctly. set() does not accept logical operators 7 years ago
AndreasMartin72 33c0416bc8 Bugfix for build error (Win7, msvc)
Ref: https://github.com/Exiv2/exiv2/issues/371#issuecomment-401319696
7 years ago
D4N 341de4500a
Merge pull request #368 from D4N/fix_issue_365
Fix #365 and #366
7 years ago
Dan Čermák b761c6d056 Remove useless casts in preview.cpp 7 years ago
Dan Čermák b517f2e13b Add regression test for #366 to the testsuite 7 years ago