Commit Graph

150 Commits

Author SHA1 Message Date
Luis Díaz Más
20a9e5affe Fix format-overflow warnings by using bigger buffer 2019-10-09 12:37:38 +02:00
Luis Díaz Más
113136e134 Replace DEBUG with EXIV2_DEBUG_MESSAGES
Fixes #926
2019-07-12 11:14:35 +02:00
Kevin Backhouse
80cd0d2990 Add bounds check on allocation size. (#854) 2019-05-16 09:36:26 +02:00
Luis Diaz Mas
6f8d8e3da6 cleanup header inclusions in API 2019-01-11 15:55:25 +01:00
Luis Diaz Mas
83bb4aa80a code formatting 2018-11-14 07:55:21 +01: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
Luis Díaz Más
603692a1d8 Copyright to Exiv2 authors 2018-09-12 19:22:31 +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
tbeu
75cdbc8b91 Use pre-increment on iterators
V803 Decreased performance. In case 'userEnd' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. futils.cpp 405
V803 Decreased performance. In case 'authEnd' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. futils.cpp 410
V803 Decreased performance. In case 'hostEnd' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. futils.cpp 428
V803 Decreased performance. In case 'e' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 711
V803 Decreased performance. In case 'e' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 841
V803 Decreased performance. In case 'e' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 958
V803 Decreased performance. In case 'i' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 855
V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. jpgimage.cpp 817
V803 Decreased performance. In case 'lib' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. version.cpp 508
V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. version.cpp 563
V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. xmpsidecar.cpp 138
2018-06-02 09:43:20 +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
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
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
efe2ccdcb6 Replaced all hardcoded error codes with ker... constants 2018-02-18 09:28:57 +01:00
tbeu
5b5987a596 Remove obsolete EXIV2_RCSID 2017-11-19 11:17:12 +01:00
tbeu
5df8b01b77 Remove obsolete svn revision 2017-11-19 11:17:11 +01:00
Robin Mills
559ace375b #1291 Reverting change in r4763 relating to windows.h as they break the Cygwin build. Retain changes in exiv2/exiv2.hpp and exv_msvc.h 2017-04-23 19:29:19 +00:00
Robin Mills
f36cccefa2 #1291 include header simplification 2017-04-23 17:31:57 +00:00
Robin Mills
307c9e266c #1286 Correction to r4752 2017-04-06 05:25:39 +00:00
Robin Mills
5a5f7dc1ac #1286 Fix submitted. 2017-04-05 18:36:14 +00:00
Robin Mills
0051366df4 #1279 Removing unused code. 2017-03-17 17:44:13 +00:00
Robin Mills
192a2a83cf #1279 Cleaned up doxygen warnings for doc and website. 2017-03-16 18:13:12 +00:00
Robin Mills
6d5c2c3256 Getting ready to release v0.26 2017-03-08 20:42:28 +00:00
Robin Mills
2ebacb6b0b #1272 Use in-memory temporary files. 2017-03-05 17:42:12 +00:00
Robin Mills
9ad811150d #1230 Removing incorrect 2-byte pad following JPEG ICC_PROFILE. 2016-11-24 12:24:12 +00:00
Robin Mills
6ea3b00b02 #1249 Fixes 2016-10-23 22:25:58 +00:00
Robin Mills
f5956d5db2 #1230 Fixes to read tiff with web-ready. Includes the BasicIo expiremental API readUnmarked() and markRead() which I will remove later. 2016-10-17 15:48:42 +00:00
Robin Mills
5f1d52e497 #1230 Added stdin-test and fixing issue identified by the test. 2016-09-25 22:43:40 +00:00
Robin Mills
f4feff0864 #1229. Fix submitted (and appropriate update to test harness). Fix an error in jpgimage::doWriteMetadata for large (>64k) ICC profiles. 2016-09-22 18:20:43 +00:00
Robin Mills
5edc759cc9 #1074 For discussion see: http://dev.exiv2.org/issues/1074#note-23 2016-09-14 10:02:51 +00:00
Robin Mills
a8c51889b8 #1074. Fix bug in jpgimage.cpp/readMetadata() concerning ICC profile 2016-09-13 09:47:02 +00:00
Robin Mills
3d57bbc6e6 #1074 Work in progress. ICC Jpeg/Png/Tiff exiv2 -eC foo.xxx writes good foo.icc profiles. icc-test.sh is broken and to be investigated. 2016-09-12 17:42:12 +00:00
Robin Mills
9ff2224fd7 #1074. Rollback r4479 which has inflicted a lot harm on the test harness. 2016-09-11 15:31:28 +00:00
Robin Mills
3aaebf50f7 #1074 Added ICC support to tiffimage.writeMetadata(). pngimage.readMetadata() is not complete. 2016-09-09 15:18:59 +00:00
Robin Mills
14f7f18222 #1057 Correction to r4633 to fix Windows build-breakers (Cygwin/MinGW and msvc) 2016-09-05 20:52:46 +00:00
Robin Mills
57ee93886a #2120 Fix submitted and appropriate changes to test/icc-test.sh (rewritting ICC in JPG was corrupting file) 2016-09-05 14:43:13 +00:00
Robin Mills
87e9c996a6 #1220 and #1074 Work in progress. Improved -pS for JPEG. #1220 is due to a bug in writing the ICC profile in jpgimage.cpp/doWriteMetadata() 2016-09-05 11:39:29 +00:00
Robin Mills
3706233c8d #1074 Correction to r4457 to fix msvc build-breaker. 2016-09-01 17:38:04 +00:00
Robin Mills
b7c90140c7 #1074 ICC support in jpgimage.cpp. Add test/icc-test.sh 2016-09-01 16:44:29 +00:00
Robin Mills
9026954816 #1074 Work in progress for ICC/jpg - changes to readMetadata() and printStructure() 2016-09-01 14:17:25 +00:00
Robin Mills
fe6a016957 #922 Correction to r4434. Fixing another msvc build breaker. 2016-08-25 19:41:20 +00:00
Robin Mills
8377456786 #922 Correction to r4344 to handle msvc build breaker. 2016-08-25 18:32:12 +00:00
Robin Mills
13be017d12 #922 exiv2 -dI deletes all IPTC chunks in a JPEG. 2016-08-25 16:20:38 +00:00
Robin Mills
06eabfdd88 #1074. jpgimage.cpp ICC support (Work in Progress) 2016-03-23 17:06:33 +00:00
Robin Mills
09c734fbcd #1108. Refactored the IPTC printStructure code from png/jpeg/tiff into iptc.cpp 2016-03-17 23:45:58 +00:00
Robin Mills
bdf8d3ad5b #1108 Added photoshop/iptc parser to png/jpeg parser. 2016-03-11 20:48:36 +00:00
Robin Mills
8e7eaa65a7 #1057, #1064, #922, #1148. Work in progress. This is a composite patch of several matters in development. None are totally complete at this time. 2016-03-09 07:51:04 +00:00
Robin Mills
a769e1a0fc #1159. Fixing MSVC build-breaker in r4197 and r4179.
Two different issues:
r4197 include <windef.h> does not compile with MSVC 2005 and changed to <windows.h>
r4179 has a short/long compare mismatch
MSVC is a severe build environment and treats warnings as errors.  MSVC is not fragile, it's robust.
2016-01-31 23:39:04 +00:00