Luis Diaz Mas
b590fa542a
Disable 'embedded' XMP when EXIV2_ENABLE_EXTERNAL_XMP is enabled
2018-05-29 10:03:41 +02:00
Luis Díaz Más
1ea0eb83df
Remove useless code for Mac
2018-05-29 10:03:41 +02:00
Luis Diaz Mas
88fecdef3e
Add additional compiler flags when external XMP is enabled on Mac
2018-05-29 10:03:41 +02:00
Luis Díaz Más
038bffd1dd
CMake: Print linker flags in the configuration summary
2018-05-29 10:03:41 +02:00
Luis Díaz Más
93edcc11b3
Doc: Add documentation about how to use the external XMP SDK with conan & cmake
2018-05-29 10:03:41 +02:00
Luis Díaz Más
b53465954a
CMake: FATAL_ERROR when both XMP cmake variables are one.
...
EXIV2_ENABLE_XMP and EXIV2_ENABLE_EXTERNAL_XMP are mutually exclusive.
2018-05-29 10:03:41 +02:00
Luis Díaz Más
9cd8cc0968
conan: Do not bring Expat when xmp=True.
...
Since the external XMP SDK is already adding the expat sources to the XMPCore library, we do not
need the Expat dependency for Exiv2.
2018-05-29 10:03:41 +02:00
Luis Diaz Mas
96aa7ef3d7
Add info about adding the piponazo's conan repository
2018-05-29 10:03:41 +02:00
Luis Diaz Mas
f2c5fcf49d
Format README-CONAN.md file
2018-05-29 10:03:41 +02:00
Luis Diaz Mas
85abdff080
AppVeyor: Remove explicit option EXIV2_ENABLE_XMP. Already ON by default
2018-05-29 10:03:41 +02:00
Luis Diaz Mas
9586928d29
Add CMake code to handle external XMP
...
Experiment: Try with testing package
2018-05-29 10:03:41 +02:00
D4N
e483856a61
Merge pull request #328 from Exiv2/memory_fixes
...
Memory issue fixes
2018-05-27 13:25:58 +02:00
Dan Čermák
a1a9c3d79a
Use reinterpret_cast instead of C style cast
2018-05-27 12:11:30 +02:00
Dan Čermák
088986e5fa
[unit_tests] Remove a memory leak from test_XmpKey.cpp
...
XmpProperties::registerNs allocates strings on the heap that must be freed
manually via XmpProperties::unregisterNs().
=> do this in TearDownTestCase()
2018-05-27 12:11:30 +02:00
Dan Čermák
b51b6fc52d
Prevent an out of bounds read in strstr in JpegBase::printStructure
...
The xmp byte array is not necessarily null terminated => strstr can read beyond
the bounds of the allocated array then.
Therefore use string_from_unterminated to remedy this issue.
Also replace xmp with a std::vector, as stl functions can throw and we don't
want a memory leak.
2018-05-27 12:11:30 +02:00
Dan Čermák
510560bbd1
Prevent out of bounds read in jpgimage.cpp JpegBase::printStructure
...
signature is extracted from an image and can lack the terminating \0, this
causes the std::string constructor and strcmp to read beyond the bounds of the
allocated array.
=> Use string_from_unterminated to construct a std::string safely and use it
in the subsequent code & use stl functions instead of C functions
2018-05-27 12:11:10 +02:00
Dan Čermák
dd52b1a832
Add helper_functions.cpp/hpp & unit tests
...
- add function which constructs a new std::string from a potentially not null
terminated char *
- add unit tests
2018-05-27 09:38:27 +02:00
Luis Diaz Mas
4713336c93
Add more unit tests for TiffHeader
2018-05-26 18:19:40 +02:00
Luis Diaz Mas
59493d1edc
Fix bug in Cr2Header::read
2018-05-26 18:19:40 +02:00
Luis Diaz Mas
b1c34ee11f
Add unit tests for Cr2Header
2018-05-26 18:19:40 +02:00
Luis Diaz Mas
1d27c21639
Rename files from cr2image_int to cr2header_int
2018-05-26 18:19:40 +02:00
Luis Diaz Mas
8eca055058
Add POC + regression test.
...
Note that we override here the method check_no_ASAN_UBSAN_errors to also
analyze the last two lines of got_stderr.
2018-05-26 09:59:37 +02:00
Luis Diaz Mas
67a5a74115
Throw when trying to write out of the buffer
2018-05-26 09:59:37 +02:00
Luis Diaz Mas
863aaebc92
Use index to access buf.pData_
2018-05-26 09:59:37 +02:00
Luis Diaz Mas
ed874703ad
Prevent call to memcpy with size==0
2018-05-26 09:59:37 +02:00
Luis Diaz Mas
f17636460f
Remove tags_int.cpp that was not used in the project
...
I introduced that file accidentally in the project while trying to move
the implementation details to xxx_int.cpp files. In this case, I found
out some issues and I just decided to leave the implementation in the
file tags.cpp.
2018-05-24 19:58:41 +02:00
D4N
89bd7d5ca1
Merge pull request #287 from Exiv2/port_redmine_issues
...
Port redmine issues 426-825 to the new test suite
2018-05-24 12:37:09 +02:00
Luis Díaz Más
b8b94dc67a
Escape characters properly once we started using python literals
2018-05-24 11:06:18 +02:00
Luis Díaz Más
48078e9c8b
Fix tests on windows by using os.path.join
2018-05-24 11:06:18 +02:00
Luis Díaz Más
72faa7331d
Fix issues with python strings & literals
2018-05-24 11:06:18 +02:00
Dan Čermák
90c8d754b7
[testsuite] Call subprocess.Popen() with shell=True on Windows
2018-05-24 11:06:18 +02:00
Dan Čermák
939ded283f
[testsuite] check stderr before stdout
...
That way you get to see error messages about wrong filenames instead of an
empty stdout
2018-05-24 11:06:18 +02:00
Dan Čermák
61dbba1396
[travis] Don't run python tests twice
...
make tests already runs the python test suite, no need to do so again
2018-05-24 11:06:18 +02:00
Dan Čermák
4826d87513
[Appveyor] Set environment variable for the Windows version of cat
2018-05-24 11:06:18 +02:00
Dan Čermák
f55cdce761
[testsuite] Port redmine issues 498-825
2018-05-24 11:06:18 +02:00
Dan Čermák
2356984274
[testsuite] Ported redmine bugfixes 426-495
2018-05-24 11:06:18 +02:00
Dan Čermák
de33dbc497
Add Vagrant VMs & combine it with gitlab-ci
...
- add Vagrantfile to contrib/vms
- add custom provisioning via shell scripts
- move gitlab-ci before_script: to ci/install_dependencies.sh which is also used
by vagrant
- change COPR setup on CentOS 7 (yum-plugin-copr does not seem to work)
2018-05-24 11:04:30 +02:00
Luis Diaz Mas
1371d677f9
Remove custom messages from enforce(xxx, Exiv2::kerCorruptedMetadata)
2018-05-23 14:14:39 +02:00
Luis Diaz Mas
c0a879aea4
Fix call to std::count, so that we count until the end of the array
2018-05-23 14:14:39 +02:00
Luis Diaz Mas
3ad0050469
Check validity of compressionFlag & compressionMethod
2018-05-23 10:57:13 +02:00
Luis Diaz Mas
2fb00c8a16
Analyze minimum needed number of null separators in PngChunk::parseTXTChunk
...
This commit fixes the heap-buffer-overflow in PngChunk::parseTXTChunk.
According to the specification:
http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html
There must be 2 null separators when we start to analyze the language tag.
2018-05-23 10:57:13 +02:00
Luis Diaz Mas
234e5794f6
Add tests for #306
2018-05-23 10:57:13 +02:00
Luis Diaz Mas
a227fcda39
debug: Add new debug message to print the PNG chunk being processed
2018-05-23 10:57:13 +02:00
Luis Diaz Mas
b0696d4da6
style: Apply formatting guidelines to one-line ifs
2018-05-23 10:57:13 +02:00
Luis Diaz Mas
4922df6018
Replace '\n' by endl that flush content. Useful for debugging
2018-05-23 10:57:13 +02:00
Luis Díaz Más
e440e40f32
ci: run make with VERBOSE=1
...
This helps to identify compilation/linking issues
2018-05-22 22:53:18 +02:00
Luis Díaz Más
c3629117d8
conan: Upgrade libcurl version
...
Thanks to this upgrade the cmake code that handles the CURL dependency
can be simplified. Now we can use the shared version of CURL in all the
platforms. However we will use for the moment the static version on Mac,
since we are having some issues with 'make tests'. Once those tests are
migrated to python we can also use the shared version there.
2018-05-22 22:53:18 +02:00
D4N
96f03ea096
Merge pull request #317 from danileo/canon_m100_support
...
Support Canon M100
2018-05-21 23:46:33 +02:00
Daniel Zucchetto
cb5135f772
Add test for Canon M100 ModelID
2018-05-21 23:35:39 +02:00
Daniel Zucchetto
4e55af8691
Support Canon M100
2018-05-19 20:44:31 +01:00