Commit Graph

2872 Commits

Author SHA1 Message Date
Robin Mills
e347b41279 Modified Exiv2::Internal::stringFormat() to use larger initial guess for 'need' to fix test/.icc-test.sh on MinGW. 2018-10-26 17:47:15 +02:00
Robin Mills
5f6ef65695 Update PROJECT_VERSION & add install() commands for CPack
- Version updated to 0.27.0.1.
- Release notes for MacOS-X Package, Linux, CYGWIN, win64 and msvc
- Redmine Release Notes Updated.
2018-10-26 17:47:15 +02:00
Luis Díaz Más
3976dbc0e7 CMake: Do not rename library outputs (dlls, pdbs, etc). Fixes a debugging issue with MSVC 2018-10-16 17:09:17 +02:00
Robin Mills
9c516116c8 Fix #401 by fixing iteration over exif data tags 2018-10-16 12:41:36 +02:00
Robin Mills
b3d077dcae Fix #460 by adding more checks in CiffDirectory::readDirectory 2018-10-14 11:58:25 +02:00
Luis Díaz Más
670fb73dd5 Fix #457 2018-10-13 11:37:57 +02:00
Dan Čermák
962962a8e9 Port Iptc::printStructure & getUshort to slices API
This fixes #211, #210, #209
2018-10-11 14:06:16 +02:00
Dan Čermák
fec6535ae8 [binaryToString] Reimplement using Slices
- reimplement binaryToString:
  - it now accepts a Slice and nothing else
  - it does not return a std::string but instead a proxy object that implements
    operator<< (this should be more efficient, as we do not need to touch the
    heap in most cases)
- addapt unit tests
- replace all occurences with the new API
2018-10-11 14:06:16 +02:00
Dan Čermák
a48d0347b7 [binaryToString] Fixed overread when passing start > 0
binaryToString(DataBuf&) only calls the C-array version. Unfortunately, its
safety check is flawed, as it only works when start is 0 (probably due to its
conterintuitive interface).
binaryToString(byte*) formats the range (start,start+size) => we have to trimm
size if size + start is larger than the DataBuf's size_
2018-10-11 14:06:16 +02:00
Dan Čermák
bfd84ddf5a [binaryToString] Improved ambiguous documentation 2018-10-11 14:06:16 +02:00
Dan Čermák
7a7ae7a1df [image_int] Move internal functions into separate translation unit 2018-10-11 14:06:16 +02:00
Dan Čermák
98bca06592 Add Slices: views of STL containers & C-arrays and add unit tests
This commit adds a very simple implementation of std::span but with
mandatory range checks and only the most essential functionality.
2018-10-11 14:06:16 +02:00
Luis Díaz Más
97379dec1d Add braces around try-catch block. Apply clang-format to the function. 2018-10-11 13:40:03 +02:00
Luis Díaz Más
4216dcd0c2 Fix cppcheck issues: knownConditionTrueFalse 2018-10-11 13:40:03 +02:00
Luis Díaz Más
ab35759de8 Fix cppcheck issues: unreachableCode 2018-10-11 13:40:03 +02:00
Luis Díaz Más
54ad1bc91a Fix cppcheck issues: duplicateBreak 2018-10-11 13:40:03 +02:00
Luis Díaz Más
b118192f94 Fix cppcheck issues: redundantAssignment 2018-10-11 13:40:03 +02:00
Luis Díaz Más
c43d998457 Fix cppcheck issues: passedByValue 2018-10-11 13:40:03 +02:00
Luis Díaz Más
989acd18c7 Fix cppcheck issues: uninitMemberVar & uninitVar 2018-10-11 13:40:03 +02:00
Luis Díaz Más
19e740b447 Restore API functions remove in #450 2018-10-10 18:16:57 +02:00
Roberto C. Sánchez
c03f73268f Prevent SIGABRT on excessive subBox length in jp2image.cpp
This fixes CVE-2018-9145
2018-10-10 11:52:39 +02:00
Borchers, Henry Samuel
11e66c6c9e BUILD_INTERFACE for include directories use PROJECT_SOURCE_DIR to allow for being built as a CMake subproject 2018-10-07 19:20:37 +02:00
Dan Čermák
916c535d94 clang-format floatToRationalCast 2018-09-17 10:03:02 +02:00
Dan Čermák
6fd1c5b4bf [types] Fix check for finite numbers on Linux
On Linux we were merely checking whether f is finite, but that does
not cover the case f=NaN.
=> use isfinite instead which checks whether f != inf && f != NaN
2018-09-17 10:02:55 +02:00
Luis Díaz Más
18690f4c54 Provide default and copy constructor for AnyError 2018-09-14 13:20:08 +02:00
Luis Díaz Más
6e4404da81 Move implementation details from tags.cpp to tags_int.cpp 2018-09-14 13:20:08 +02:00
Luis Díaz Más
b9f913d5af Move implementation to .cpp files. Fix more issues related to visibility settings 2018-09-14 13:20:08 +02:00
Luis Díaz Más
e3f975137c Use STATIC_DEFINE to solve issues with OBJECT library 2018-09-14 13:20:08 +02:00
Luis Díaz Más
6ba4081f95 Use CMake-GenerateExportHeader to generate a macro to export symbols
- Delete the hardcoded macros in config.h taking care of that.
2018-09-14 13:20:08 +02:00
Luis Díaz Más
812762cf5a Remove usage of CPLUSPLUS11 2018-09-14 07:43:21 +02:00
Luis Díaz Más
ab6aac054a Remove deprecated code from version source files 2018-09-14 07:43:21 +02:00
Luis Díaz Más
1871ce5acd Remove 'version.hpp' inclusion from places where it is not needed
By removing the inclusion from types.hpp we avoid lots of recompilation
of source files.
2018-09-14 07:43:21 +02:00
Luis Díaz Más
e5bcabd026 Do not print hexadecimal version value when running exiv2 --version 2018-09-14 07:43:21 +02:00
Dan Čermák
67ec90bdab Fix switch value in BigTiffImage::readData
This function extracts a 2, 4 or 8 byte integer from the image and
swaps it according to the current setting. However, it was implicitly
assuming, that it reads the same amount from the image is is
requested.
If that is not the case, e.g. if 8 bytes are requested but
only 4 are read
=> result is created via byteSwap8() which reads 8 bytes
   !but 4 of those are uninitialized!
Using the actually read size fixes this problem.
2018-09-13 11:18:29 +02:00
Dan Čermák
ecf955812d Replace reachable assertions with enforce in BigTiffImage::readData 2018-09-13 11:18:29 +02:00
Dan Čermák
b3199a0720 Fix division by zero in BigTiffImage::printIFD
This fixes #262
2018-09-13 11:18:29 +02:00
Robin Mills
afb98cbc6e Allocate correct amount of memory for the ICC profile 2018-09-13 11:18:29 +02:00
Robin Mills
8ff26931e3 Do not use Image::printStructure() when reading images as this causes security issues. 2018-09-13 11:18:29 +02:00
Luis Díaz Más
1bdbb86b0c Fix warning about implicit conversion to bool 2018-09-12 19:22:31 +02:00
Luis Díaz Más
dba48ac3d9 Fix warning on VS2008 2018-09-12 19:22:31 +02:00
Luis Díaz Más
603692a1d8 Copyright to Exiv2 authors 2018-09-12 19:22:31 +02:00
Luis Díaz Más
c4cc019dff Hide -Wunused-variable issues by using the UNUSED() macro 2018-09-12 19:22:31 +02:00
Luis Díaz Más
94375034e6 Fix -Wsign-compare issues 2018-09-12 19:22:31 +02:00
Luis Díaz Más
18ded9ccf3 Use static version of libcurl.
Note that this will simplify the packaging/deployment
2018-09-12 19:22:31 +02:00
Luis Díaz Más
0bfa0168df Cleanup some of the PACKAGE_XXX variables and rely in the ones given by the project() command 2018-09-12 19:22:31 +02:00
Luis Díaz Más
980f2e9462 Use isnan(f) as an alternative to isinf() on __APPLE__ 2018-09-12 08:11:54 +02:00
Robin Mills
6d1c318fc6 Fixes in PngChunk::readRawProfile 2018-09-11 09:49:59 +02:00
Luis Díaz Más
f5b40f3e82 Fix more issues in PngChunk::readRawProfile 2018-09-11 09:49:59 +02:00
Luis Díaz Más
847da051c0 Fix bug in PngChunk::readRawProfile
- Now it takes into account text.size_ when searching for a newline
char.
2018-09-11 09:49:59 +02:00
Luis Díaz Más
6b77e9f6c8 Do not use std::vector::data() which is not part of c++98 2018-09-10 10:31:00 +02:00