Commit Graph

98 Commits

Author SHA1 Message Date
clanmills
7383d96d47 Fix compiler error when using EXIV2_DEBUG_MESSAGES. 2020-05-31 10:22:46 +01: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
6068df4c01 Add better bounds checking in PngImage::printStructure(). (#862) 2019-05-17 05:44:28 +02:00
Kevin Backhouse
8cd95e2218 Avoid negative integer overflow when chunkLength == 0.
This fixes #789.
2019-05-06 06:27:10 +02:00
Kevin Backhouse
6fa2e31206 Avoid negative integer overflow when iccOffset > chunkLength.
This fixes #790.
2019-05-05 12:21:32 +02:00
Luis Diaz Mas
127c2eac0e Fix warnings on MSVC 2019-01-25 08:12:59 +01:00
Luis Díaz Más
704fc56d52 Keep the profileName from readMetadata and use it in writeMetadata 2019-01-24 23:16:25 +01:00
Luis Díaz Más
e385599067 Refactoring to make the doe more readable. Fix icc tests 2019-01-24 22:30:30 +01:00
Luis Díaz Más
d1097fab59 Factor our function to read PNG Chunk info 2019-01-24 21:21:47 +01:00
Luis Díaz Más
914a8c5585 Factor out exception throw in different places inside isPngType 2019-01-24 18:52:38 +01:00
Luis Diaz Mas
88f22e13cb Fix ICC profile in PNG images 2019-01-21 23:10:12 +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
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_
2018-07-29 00:20:43 +02:00
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.
2018-07-29 00:20:30 +02:00
Dan Čermák
607b19111c [DataBuf] Replace wrong usage of release() with free() 2018-07-28 23:50:33 +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
Dan Čermák
751fba8b54 Added dataBuf size check before calling PngChunk::decodeIHDRChunk
- cdataBuf must be at least 8 bytes long otherwise decodeIHDRChunk
  reads out of bounds
- pngImage::readMetadata now skips png chunks where the offset for
  IHDR chunks is invalid
- added assertion into PngChunk::decodeIHDRChunk() to ensure dataBuf
  size
2018-02-22 14:55:12 +01: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
clanmills
327b3f6c4d Fix https://github.com/Exiv2/exiv2/issues/83 2017-09-29 13:59:12 +01:00
Robin Mills
82dbe6199d https://github.com/Exiv2/exiv2/issues/11 Closed. Coincidentally Raphael reported issues with Visual Studio 2015 Community Edition. Issue 11 and Raphael's issues should now be resolved. 2017-06-29 22:13:26 +01: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
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
5b38d4528a #1108 Added code to dump Exif, IPTC and iTXt/zTXt comment/description blocks for PNG files. 2016-10-06 19:52:52 +00:00
Robin Mills
793bd6ca63 #1109 MinGW/32 daily build. Fix GCC warning on MinGW/32 gcc 4.9.2 2016-09-20 16:18:07 +00:00
Robin Mills
d321dad695 #1108 Fixing issue with pngimage::printStructure() and the "Software" string in test/data/imagemagick.png 2016-09-16 11:19:07 +00:00
Robin Mills
1bea0c6aeb #1108 Better string formatting (and associated test/data changes). Tweaks to code layout for r4497. 2016-09-15 14:09:43 +00:00
Robin Mills
458580373a #1108 Enhanced pngimage::printStructure() to display checksum 2016-09-15 13:15:48 +00:00
Robin Mills
f2ec4ce36a #1074 Work in progress. fixed pngimage.cpp doWriteMetadata(). 2016-09-15 12:20:51 +00:00
Robin Mills
7bd874049e #1074 Work in progress. -eC -pC -eC- work for JPG/PNG/TIFF/WEBP. pngimage::doWriteMetadata() does not update iCCP chunk. 2016-09-14 20:25:21 +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
06eabfdd88 #1074. jpgimage.cpp ICC support (Work in Progress) 2016-03-23 17:06:33 +00:00
danielkaneider
26e73a41bc fix msvc compilation (rv 4229) 2016-03-22 15:55:14 +00:00
Robin Mills
e7b804f3f5 #1108 Refactored static indent(depth) from png/tiff/jpeg to Internal::indent(depth) 2016-03-18 07:48:15 +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
8369592af1 #1074. Thanks to Max for reporting this and providing the test file. 2016-03-17 22:36:23 +00:00
Robin Mills
bdf8d3ad5b #1108 Added photoshop/iptc parser to png/jpeg parser. 2016-03-11 20:48:36 +00:00
Robin Mills
947ed69de8 #1108 and #1074 Correction to r4168 to fix MSVC build breaker. 2016-01-07 20:32:38 +00:00
Robin Mills
4617dc3728 #1108 and #1074 -pC and -pR (print Color Profile, print Recursively) now work on png. 2016-01-07 16:13:28 +00:00
Robin Mills
f49dd0b95f #1108 and #1074 Correction to r4165 to fix MSVC build breaker and to document: exiv2 -eC (extract ICC profile). 2016-01-05 16:52:36 +00:00
Robin Mills
fd5e983746 r1108 Recursively dump an image (exiv2 -pR file...) 2016-01-05 14:39:49 +00:00
Robin Mills
6808b073f3 #1074. Implemented exiv2 options -eC and -pC for JPEG. 2015-08-26 15:05:58 +00:00