139 Commits (d29001f2a447936973e3d456225e1d5d86bdf390)

Author SHA1 Message Date
Kevin Backhouse 57cad2619b Add bounds check in Jp2Image::doWriteMetadata().
(cherry picked from commit e6a0982f7cd9282052b6e3485a458d60629ffa0b)
4 years ago
Kevin Backhouse b3de96f4b4 Add more bounds checks in Jp2Image::encodeJp2Header 4 years ago
Kevin Backhouse 23c1cda99d Fix signed/unsigned compiler warnings. 4 years ago
Kevin Backhouse f930883919 Better bounds checking in Jp2Image::encodeJp2Header() 4 years ago
Luis Díaz Más de4d43d4d1 Fix warnings EXIV2_TEAM_EXTRA_WARNINGS
Most of the warnings fixed were:
- Hiding of local variables
- Hiding of globals
- Useless casts
- Conversions between float/double
4 years ago
Robin Mills d73dd0874d Fix icc_test which is failing on Linux:
luis@ryzenLinux:/media/linuxDev/programming/exiv2/buildReleaseSanitizers$ cp large.icc Reagan2.icc
luis@ryzenLinux:/media/linuxDev/programming/exiv2/buildReleaseSanitizers$ bin/exiv2 -iC /tmp/Reagan2.jp2
/media/linuxDev/programming/exiv2/src/jp2image.cpp:661:28: runtime error: reference binding to misaligned address 0x61f000002a9e for type 'const struct Jp2BoxHeader', which requires 4 byte alignment
0x61f000002a9e: note: pointer points here
 07 07 01 00 00 00  0c 53 63 6f 6c 72 02 00  00 00 00 0c 48 4c 69 6e  6f 02 10 00 00 6d 6e 74  72 52
4 years ago
Luis Díaz Más 0bbaa6eff3 cpp: Replace auto_ptr by unique_ptr 4 years ago
Pydera 13e5a3e023 Fix out of buffer access in #1529 4 years ago
Robin Mills 22ea582c6b fix_1522_jp2image_exif_asan 4 years ago
Robin Mills d632988bbd Massive code prolog cleanup. 4 years ago
Robin Mills 22ed9b157b Fixed typo declaration of pad when writing ICC profile. 5 years ago
Robin Mills 181dd47385 Fix correctly this time and tested with the user files. Test suite updated to use Reagan2.jp2 5 years ago
Robin Mills b91de7acd0 fix_1236_0.27 5 years ago
clanmills 1b917c3f7d Fix #1011 fix_1011_jp2_readmetadata_loop 6 years ago
Luis Díaz Más 113136e134 Replace DEBUG with EXIV2_DEBUG_MESSAGES
Fixes #926
6 years ago
Luis Díaz Más 51f3910413 [jp2image] Limit data representation to 30 bytes
- fixes #744
6 years ago
D4N adfc01f2e0 Update tests/bugfixes/github/test_issue_742.py
Co-Authored-By: piponazo <piponazo@gmail.com>
(cherry picked from commit 39d8904696338d5bd4a9c7e9a96a798a791d0973)
6 years ago
Luis Diaz Mas 25ddbaa6c0 Make subBox.length check in jp2image.cpp more robust
(cherry picked from commit a154b992ccad71a7d95a94cdedb933fa66a51b61)
6 years ago
Luis Díaz Más 8c81e1146c clang-format Jp2Image::printStructure()
(cherry picked from commit b6e4ca0a8cfff1ad0f6040901382863cccee33cb)

# Conflicts:
#	src/jp2image.cpp
6 years ago
Luis Díaz Más 051b5d9df1 Fix #742 by detecting incorrect subBox size
(cherry picked from commit 1bdd3eab5ebdde324dbfecc3fb6d6495b32d2e4d)
6 years ago
Luis Díaz Más 436b0f87b5 Add missing header when -DDEBUG is present 6 years ago
Robin Mills a33041a8b7 Fix: https://github.com/Exiv2/exiv2/issues/562 for stringFormat() crashes. 7 years ago
Dan Čermák 962962a8e9 Port Iptc::printStructure & getUshort to slices API
This fixes #211, #210, #209
7 years ago
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
7 years ago
Roberto C. Sánchez c03f73268f Prevent SIGABRT on excessive subBox length in jp2image.cpp
This fixes CVE-2018-9145
7 years ago
Luis Díaz Más 603692a1d8 Copyright to Exiv2 authors 7 years ago
Luis Díaz Más ffbcaa2e6d Fix MSVC warning C4267: conversion from 'size_t' to 'long' 7 years ago
Dan Čermák efe2ccdcb6 Replaced all hardcoded error codes with ker... constants 7 years ago
Dan Čermák fcb4257051 Add check for DataBuf.size_ in Jp2Image::readMetadata()
When parsing a subBox that is a ColorHeader, a length is extracted
from the input file and fed directly into DataBuf() (which calls
malloc). A crafted input file can provide arbitrarily (up to
max(uint32_t)-8) large values and result in excessive memory
allocation.

This commit adds a check for the new size of DataBuf so that it is not
larger than the remaining size of the file.

This fixes #202 aka CVE-2018-4868
7 years ago
Luis Diaz Mas d09c4bb7cd Fix arithmetic operation overflow 8 years ago
tbeu 5b5987a596 Remove obsolete EXIV2_RCSID 8 years ago
tbeu 5df8b01b77 Remove obsolete svn revision 8 years ago
Robin Mills e96e0daa8a Jp2Image::printStructure: Corrected used DataBuf for output 8 years ago
Robin Mills befe8c64e3 Jp2Image::printStructure: only print output when bPrint is set 8 years ago
Robin Mills 13db7fdec2 Formatting changes 8 years ago
Dan Čermák ff18fec24b Fix for CVE-2017-14860
A heap buffer overflow could occur in memcpy when icc.size_ is larger
than data.size_ - pad, as then memcpy would read out of bounds of data.

This commit adds a sanity check to iccLength (= icc.size_): if it is
larger than data.size_ - pad (i.e. an overflow would be caused) an
exception is thrown.

This fixes #71.
8 years ago
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. 8 years ago
Robin Mills 44da4724b3 #1175 Correction to r4756 Another three casts required to build with Visual Studio (size_t code ripple) 8 years ago
Robin Mills 6d5c2c3256 Getting ready to release v0.26 8 years ago
Robin Mills 2ebacb6b0b #1272 Use in-memory temporary files. 8 years ago
Robin Mills dd0a22814c #1247 Another correction to r4655 concerning clang/apple. 9 years ago
Robin Mills 9853ca55bd #1247. Correction to r4655 to handle clang on plaforms other than MacOS-X. 9 years ago
Robin Mills 92659f24c8 #1247 Restrict clang pragma to __APPLE__ 9 years ago
Robin Mills 4abb560cf7 #1243. Fixing compilation warnings from clang in jp2image.cpp 9 years ago
Robin Mills 764f079dff #1243 Fixing typo/build breaker. 9 years ago
Robin Mills 6a1b7d262f #1243 Correction to msvc build breaker in r4648 9 years ago
Robin Mills 18ecd0e890 #1243 Adding ICC Profile support to jp2image.cpp 9 years ago
Robin Mills b9f584fbbf #1430 Correcting MSVC build breaker in r4639 9 years ago
Robin Mills f5956d5db2 #1230 Fixes to read tiff with web-ready. Includes the BasicIo expiremental API readUnmarked() and markRead() which I will remove later. 9 years ago
Robin Mills 774f96094c #1243 Work-in-progress on iccProfile related code. 9 years ago
Robin Mills 163f3ce7f1 #1243 Work-in-progress on writing ICC profiles. Fixed elusive issue in exiv2 -pS foo.jp2 9 years ago
Robin Mills 05f56e95af #1242 Issue warning when we encounter erroneous Exif\0\0 in the Exif UUID box. 9 years ago
Robin Mills 099dd70c59 #1230 Fix bigEndian issue in toAscii() 9 years ago
Robin Mills 3d77c41e31 #1243 Work-in-progress. 9 years ago
Robin Mills 2e9138cf91 #1243 Work-in-progress. Still to add code to writeMetadata for icc profiles. 9 years ago
Robin Mills ebea8991e5 #1243 Work-in-progress. Added test/data/relax.jp2 which has an embedded ICC profile. 9 years ago
Robin Mills 442b0155d0 #1243 Added XMP and IPTC data to Reagan.jp2. Corrected printStructure() appropriately.
Will add jp2image::writeMetadata()/iccProfile tomorrow and update tests.
9 years ago
Robin Mills 699e1c744e #1243 Work in progress. Implemented jp2image::printStructure. Still to add iccProfile support to jp2image::writeMetadata() 9 years ago
Robin Mills ed63a113e1 #1242 Work in progress. Fixing src/jp2image.cpp. Added test file. Test suite to be updated to use Reagan.jp2 (and hopefully additional test files) 9 years ago
Andreas Huggel fd80993ab0 Updated copyright notice. 10 years ago
Robin Mills 0df8356a56 #1029. Thank You, Thomas for reporting this and providing the patch. 11 years ago
Robin Mills 97aa1149c9 #1019. Thank You Thomas for finding this issue. 11 years ago
Robin Mills d393b0fa7e trunk: exiv2 v0.25 11 years ago
Mahesh cff1efe122 Coverity scan fixes CID : 981999 (size overflow warning : typecasted) and 981993( divided by zeor warning : added check beore operation) 11 years ago
Robin Mills 4e530fbce0 Bumping the copyright notice again. (re-doing 3089 without breaking the build!) 12 years ago
Robin Mills a297d2b69e Rollback 3089 - somehow it's broken the build! 12 years ago
Robin Mills da1ed8c536 Bumping the copyright notice in src &samples from 2012 to 2013 12 years ago
Robin Mills 6ca49acd13 Work on Issue 846 (porting video code to MSVC). See http://dev.exiv2.org/issues/846 (item #8) for more discussion. 13 years ago
Andreas Huggel 0d397b95c7 Updated copyright message for 2012. 13 years ago
Robin Mills ebfb513a21 Removing the casts which were regrettably added with SVN: 2525. 14 years ago
Robin Mills e2c570a1ce EPS project.
added long ul2Data(byte* buf, size_t s, ByteOrder byteOrder) to the DevStudio 64 bit build.
This rippled requiring casts to differentiate ul2Data(byte*, uint32_t,size_t) and ul2Data(byte*,size_t,size_t)
Team review requested.
14 years ago
Andreas Huggel 7770151915 Updated Copyright message for 2011. 15 years ago
Andreas Huggel dc264bc00d #476, #614: Introduced class LogMsg for enhanced logging, migrated all existing warnings and error messages (not the exceptions) to use the new logic. Every log message now has a type (debug, info, warning, error). Applications can set a logging level to determine which messages are processed and supply a custom log message handler at runtime. (Based on a contribution by Simson Garfinkel.) 15 years ago
Andreas Huggel 06ce0d18b6 - Introduced exiv2.hpp as a wrapper to include all Exiv2 objects. (Renamed existing exiv2.hpp to exiv2app.hpp)
- Changed Sony/Minolta pretty-print function to print EV value
- Renamed rcsid.hpp to rcsid_int.hpp, do not publish it anymore
15 years ago
Andreas Huggel 6d496a4888 Updated Copyright notice for 2010. 15 years ago
Andreas Huggel 370af5c8a3 Merged all changes from the unstable branch into the trunk. 16 years ago
HumanDynamo 67dfeaf3bd fix comment 16 years ago
HumanDynamo 76a3a36e51 creating JPEG2 blank file from scratch is now supported 16 years ago
Andreas Huggel 8a6d9dbc42 Updated Copyright notice for 2009. 17 years ago
Andreas Huggel b5a00fcd5c * Added options -pp and -ep to list and extract preview images
* #584: Implemented missing member function
* API change, class PreviewImage: Added members to access all preview properties
* Minor fix: Suppress XMP encoding error when XMP is not enabled.
17 years ago
Andreas Huggel 7efd36d244 Removed trailing whitespace. 17 years ago
Andreas Huggel d866b20d82 #567: Fixing MSVC build, intermediate revision, it is still broken. 17 years ago
HumanDynamo 25e068ab36 JPEG2000 read/write support :
-Fix Exif extraction to find the first occurence of Exif hearder from raw Exif Data.
-Fix Xmp extraction to find start of XML data stream.
-Add more debug info to hack (use DEBUG switch if necessary)
-Write Exif/Iptc/Xmp data work fine now !!!
-Register JP2 image writting support with right properties.
17 years ago
HumanDynamo 7dfd385205 disable debug messages 17 years ago
HumanDynamo 5ff3b4603f JPEG2000 parser : fix parsing to extract Metadata. Duing a wrong offest between box (in some cases), the jump between box been wrong
First try to write metadata in dedicated box (Exif, Iptc, and Xmp). It doesn't work yet properlly duing a wrong detection of eof. Still todo
17 years ago
Andreas Huggel b759193273 Removed trailing whitespace. 17 years ago
Andreas Huggel 0d55992e2f Merged unstable branch to trunk. 17 years ago
Andreas Huggel ef93aa9c36 s/Ovolabs/Ovolab/ 17 years ago
Andreas Huggel 654d51a366 Added read support for jp2 and psd images, stubs for gif, bmp and tga images, and pixelWidth and pixelHeight methods on Image (Marco Piovanelli). 17 years ago