Commit Graph

5479 Commits

Author SHA1 Message Date
D4N
368771f3fd
Merge pull request #285 from D4N/ub_memleak_fixes
Fix some undefined behavior and memory leaks
2018-04-25 09:27:39 +02:00
Dan Čermák
b1a31352b6 Add default constructor for XmpData 2018-04-25 00:13:51 +02:00
Dan Čermák
fc60d97a29 Prevent passing of null-pointers to libc functions 2018-04-25 00:13:41 +02:00
Dan Čermák
2bf89f4854 Store pointers to Impl classes in auto_ptr
Pimpl class Impl is stored in raw pointers which are allocated on the heap in
the constructor. However, the constructor can throw an exception resulting in a
memory leak as the destructor is **not** invoked.
=> A smart pointer is however properly deallocated.
2018-04-25 00:13:26 +02:00
D4N
c922aa7b46
Merge pull request #282 from D4N/testsuite_update
Testsuite update
2018-04-23 12:41:08 +02:00
Dan Čermák
740e4ecad1 [testsuite] Improve output in case of errors
use the msg= option of unittest.assertXyz() to improve the error
reporting
2018-04-23 10:47:52 +02:00
Dan Čermák
b6d93558ee [testsuite] Added option to use different encodings for the output 2018-04-23 10:23:50 +02:00
Dan Čermák
dd3bcaf41f [testsuite] Added check that test list have same length
commands, retval, stdout & stderr are lists
if they don't have the same length, they are truncated to the smallest list
thereby silently dropping test cases
=> now a ValueError is raised preventing that
2018-04-23 10:17:36 +02:00
Dan Čermák
11cd1eabf8 [testsuite] Addapt tests to new test suite structure 2018-04-23 10:17:36 +02:00
Dan Čermák
c40c90141f [testsuite] Add debug mode & search directory to runner 2018-04-23 10:17:36 +02:00
Dan Čermák
4656af73bc [testsuite] Fix variable names in suite config
The variables contained a minus which must not be used in template string
variables.
=> Use underscores instead
2018-04-23 10:17:36 +02:00
Dan Čermák
cac0bc9656 [testsuite] Adapt documentation to recent changes
- change from {var} => $var
- use metaclass instead of direct inheritance
2018-04-23 10:17:17 +02:00
Dan Čermák
bd9d085141 [testsuite] Refactor test suite to use metaclasses & template module
The testsuite now uses python's template module for string substitutions which
allows for a more natural substitution syntax known from the shell. Also, it
allows to run the substitutions multiple times, which is not possible with
string.format().
The heavy-lifting is now performed via a metaclass, which expands all variables
on the class creation.
2018-04-21 00:59:59 +02:00
Luis Díaz Más
02aa13abf3 Install conan-dependencies DLLs into install/bin.
We also changed the way in which we copy the DLLs to the bin folder inside the build directory.
Before we were directly placing the conan-deps DLLs into the bin folder directly. Now we place
them into a directory called conanDlls, and from there we copy them to bin or install/bin
at build and install steps respectively.
2018-04-19 17:19:47 +02:00
Luis Díaz Más
c80b1b9d51 New documentation about how to use Conan 2018-04-11 21:59:54 +02:00
Luis Díaz Más
a923b067b5 Minor updates in README.md 2018-04-11 21:59:54 +02:00
Luis Díaz Más
fbd8e2669e sort alphabetically the sources in src/CMakelists.txt 2018-04-09 23:04:35 +02:00
Luis Díaz Más
de5b9ebf89 Remove duplication of sources in src/CMakeLists.txt 2018-04-09 23:04:35 +02:00
Luis Díaz Más
5a6e66fd5b Update RADME-CMAKE.
- Some notes about how to pass -DDEBUG via CMake.
- Update comments about conan.
- Some other minor modifications.
2018-04-09 18:53:00 +02:00
Luis Díaz Más
71ecc44a5e Remove from -DDEBUG from Debug builds in Mac and Linux 2018-04-09 18:53:00 +02:00
Luis Díaz Más
ffbcaa2e6d Fix MSVC warning C4267: conversion from 'size_t' to 'long' 2018-04-09 15:54:27 +02:00
Luis Díaz Más
794fea2639 Replaced way to check buffer after calling DateValue::copy 2018-04-08 10:10:12 +02:00
Luis Díaz Más
bd40c18f1c Use variable in TimeValue::copy to remove -Wunused-variable warning 2018-04-08 10:10:12 +02:00
Luis Diaz Mas
a246c73d6f Use unused variable instead of hard-coded values in DateValue::copy 2018-04-08 10:10:12 +02:00
Luis Diaz Mas
bf0b7affaa Add few basic unit tests for DateValue
I feel more confortable doing changes in a code that I do not know by
having some unit tests around it. These characterisation tests will
also be useful as documentation.
2018-04-08 10:10:12 +02:00
Mario Emmenlauer
548d7688c7 samples/geotag.cpp: fixed debugging code to be in the correct ifdef 2018-04-08 07:45:48 +02:00
Luis Díaz Más
bf7047a71b clang-format XmpKey code 2018-04-07 20:04:22 +02:00
Luis Díaz Más
b545605d25 Add characterisation tests for XmpKey 2018-04-07 20:04:22 +02:00
Luis Díaz Más
336b759cc0 Remove 'using namespace' from public header 2018-04-06 09:23:58 +02:00
Luis Díaz Más
28ca8aa529 Fix Appveyor builds by disabling the search of Iconv on Windows
Note that Iconv has not been used on AppVeyor until now.
2018-04-06 09:05:01 +02:00
Fredrik Lingvall
db5bb66d06 CONTRUBUTING.md updates (#234)
* Restructured the file: added TOC, new sections: lens data and bug reports, and removed coding guidelines.

* Added a CODING_GUIDELINES.md file (which previously was a part of the CONTRIBUTING.md file).
2018-04-04 09:55:03 +02:00
Luis Diaz Mas
07d75cd0e8 Check if ExifData::findKey return valid iterators 2018-04-02 17:46:29 +02:00
Luis Diaz Mas
ffab622633 Add reproducer for #247 2018-04-02 17:46:29 +02:00
D4N
314d2f91a7
Merge pull request #256 from piponazo/fix253
Fix for #253
2018-04-01 09:56:49 +02:00
Luis Diaz Mas
08aa27ae37 Add reproducers for #253 and #246 2018-04-01 09:21:20 +02:00
Luis Díaz Más
858c99b4df Add enforce before calling REPORT_MARKER with invalid marker 2018-04-01 08:20:22 +02:00
Luis Díaz Más
5e5d76ad0a clang format function 2018-03-30 08:10:58 +02:00
Dan Čermák
8b7941b733 [cmake] Add EXTRA_COMPILE_FLAGS to samples & unitTests
Add the additional compiler flags added by -DEXIV2_TEAM_EXTRA_WARNINGS=ON to
the targets in samples/ & unitTests/
This fixes #204
2018-03-29 13:17:24 +02:00
D4N
1e016f82e7
Merge pull request #249 from D4N/port_github_issues
Port GitHub issues to the new test suite
2018-03-28 15:02:57 +02:00
Dan Čermák
e78982c81a [testsuite] simplify test/Makefile 2018-03-28 10:07:41 +02:00
Dan Čermák
1f32207271 [testsuite] rename test_issue_208 -> test_CVE_2017_17722
the issue got a CVE assigned
2018-03-28 10:07:41 +02:00
Dan Čermák
4533d60e74 [testsuite] Added helper function for system_tests.Case.compare_stderr 2018-03-28 10:07:41 +02:00
Dan Čermák
02f60f11ae [testsuite] Reimplemented a part of system_tests.CopyFiles
- main file handling functionality is performed by a base class => can
  be easier extended if required
2018-03-28 10:07:41 +02:00
Dan Čermák
3b01d5205a [testsuite] Port all regression tests for github issues 2018-03-28 10:07:41 +02:00
Dan Čermák
3cbb031442 [testsuite] Unified CVE test cases 2018-03-28 10:07:41 +02:00
Dan Čermák
e597e5b811 [testsuite] Fixed CVE number 2018-03-28 10:07:41 +02:00
Dan Čermák
c754ca6d14 [testsuite] Corrected class name, issue had no CVE assigned 2018-03-28 10:07:41 +02:00
Dan Čermák
71f9a24027 [testsuite] Unified variable names 2018-03-28 10:07:32 +02:00
D4N
bdbab63531
Merge pull request #239 from D4N/fix_CVE_2017_1000126
Fix CVE-2017-1000126
2018-03-28 09:27:42 +02:00
Dan Čermák
48982697b0 Add reproducer for CVE-2017-1000126 to the test suite 2018-03-27 23:46:13 +02:00