Kevin Backhouse
783b3a6ff1
Improve bound checking in WebPImage::doWriteMetadata()
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
Luis Díaz Más
0bbaa6eff3
cpp: Replace auto_ptr by unique_ptr
4 years ago
Robin Mills
d632988bbd
Massive code prolog cleanup.
4 years ago
clanmills
2bad338b9d
Fix compiler warning on macOS about enforce condition being always true.
5 years ago
Luis Díaz Más
e925bc5add
Fix integer overflow by checking size against header_size
...
Note that the problem occurs when data_size is less than header_size
what causes a buffer overflow in &data[i]
Co-Authored-By: D4N <dan.cermak@cgc-instruments.com>
6 years ago
Luis Díaz Más
113136e134
Replace DEBUG with EXIV2_DEBUG_MESSAGES
...
Fixes #926
6 years ago
Kevin Backhouse
6a44698abc
Small change to comment.
6 years ago
Kevin Backhouse
3c818f49d9
Revert accidental whitespace change.
6 years ago
Kevin Backhouse
3faeaefbf5
Improve portability of bounds checks.
6 years ago
Kevin Backhouse
86816c0280
Fix signed/unsigned mismatch.
6 years ago
Kevin Backhouse
caa4e6745a
Avoid negative integer overflow when `filesize < io_->tell()`.
...
This fixes #791 .
6 years ago
Robin Mills
a33041a8b7
Fix: https://github.com/Exiv2/exiv2/issues/562 for stringFormat() crashes.
7 years ago
Robin Mills
03b4f1deae
Fix: https://github.com/Exiv2/exiv2/issues/580
7 years ago
skal
ecaf1dd478
Fix alpha bit detection in VP8L chunks
...
As per the spec ([1]), the alpha_bit is located on the 4th byte of the payload, just after the height.
This seems to fix the bug reported on GIMP ([2]) where an incorrect file was generated.
[1] https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification#2_riff_header
[2] https://gitlab.gnome.org/GNOME/gimp/issues/1818
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
Luis Díaz Más
b118192f94
Fix cppcheck issues: redundantAssignment
7 years ago
Luis Díaz Más
603692a1d8
Copyright to Exiv2 authors
7 years ago
Dan Čermák
1ab921cb83
Add two padding bytes to exifLongHeader to prevent overreads
...
in the following call:
getHeaderOffset (payload.pData_, payload.size_, (byte*)&exifLongHeader, 6);
getHeaderOffset would read 6 bytes from exifLongHeader, reading beyond the
bounds of the array => add 2 padding bytes to prevent overreads
7 years ago
Dan Čermák
81b6d36c90
[webp] Enforce minimum read size in decodeChunks
...
The size parameter is only checked for upper bounds, but not for lower.
If it is too small, then created dataBuf will be too small and overflow in one
of the subsequent memcpy() calls.
This fixes #378 / CVE-2018-14046
7 years ago
Dan Čermák
bc58752d18
Remove useless casts
...
This commit removes only casts where type A is cast to the exactly same
type (and not to a platform dependent typedefs)
7 years ago
Dan Čermák
3c20cc06a9
Fix CVE-2017-1000126
...
CVE-2017-1000126 is a Stack out of bounds read in the WebP parser caused by the
parameter size & filesize being too large, causing the parser to land in an
infinite loop and eventually crash. Enforcing that the size over which the
parser iterates is smaller than the file fixes this issue.
This fixes #175 .
7 years ago
Dan Čermák
49db96cd58
[webp] Fix wrong filesize parameter being extracted from the header
...
The webp header contains the filesize of the image starting at the 8th byte in
bytes 4 to 8 encoded as a little endian 32 bit unsigned integer. The code was
erroneously assuming that the extracted filesize is starting at the 12th byte,
i.e. at the end of the WebP file header.
Source: https://developers.google.com/speed/webp/docs/riff_container
7 years ago
Dan Čermák
efe2ccdcb6
Replaced all hardcoded error codes with ker... constants
7 years ago
tbeu
5b5987a596
Remove obsolete EXIV2_RCSID
8 years ago
tbeu
5df8b01b77
Remove obsolete svn revision
8 years ago
clanmills
d43cd82002
Fix #80
8 years ago
Luis Díaz Más
1c03767391
Move inclusion of private header from .hpp to .cpp (not needed in the .hpp)
8 years ago
Robin Mills
11993b3b55
#1271 Thanks to Ben for reporting this and providing the patch.
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
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
a1877c04e2
#1230 and #1199 Correction to r4575
9 years ago
Robin Mills
681acc7901
#1199 and #1230 webpImage::printStructure(). Reporting Offset == 0 on Tiger (32bit).
9 years ago
Robin Mills
8ad06d6f17
#1199 Fixing build-breaker when -DDEBUG is used.
9 years ago
Robin Mills
fa24a8a614
#1199 Fixing webp-test.sh. Use -iXX to inject XMP into file without XMP->Exif/IPTC conversion
9 years ago
Robin Mills
027b3917ec
#1199 Spit'n'polish on the loops in printStructure(), metadataRead() and doWriteMetadata(). Added tests with even byte count for ICCP and XMP Chunks.
9 years ago
draekko
ed7b20a20e
#1199 fixed typo from cut/paste in previous commit causing exif flag not to be set for VP8X chunk.
9 years ago
draekko
c858b7d44e
#1199 minor code update, updated comments, added constants for headers, bit definitions, and misc.
9 years ago
Robin Mills
9a061d895e
#1199 Fix WebP printStructure(), readMetadata() and doWriteMetadata() to handle payload padding byte. Extended webp-test to cover -iX, -ix and -ie
9 years ago
draekko
600eb0d3dd
#1199 Fixed issue with -ix, wasnt padding odd sized chunks for exif/xmp.
9 years ago
Robin Mills
d369aa67d5
#1199 Test suite changes and associate fixes to the code.
9 years ago
Robin Mills
0462d2bf0f
#1199 . Adding tests for -iC. Fixed bug in -pC. Test code added for -ix and -ie, however I don't think the options are working correctly.
9 years ago
draekko
b318674f75
#1199 fixed -de -dc options, add -iC option to insert icc profiles
9 years ago
Robin Mills
043c039d25
#1199 Fixing exiv2 -dC image-path to delete ICC profile.
9 years ago
draekko
dba4e7fb42
#1199 removed exif header padding on metadata writes.
9 years ago
draekko
6f7b3ba8f7
#1199 removed convenience converstion for iptc to xmp, apps should handle it directly since webp doesnt support iptc.
9 years ago
tbeu
1ec86a8b79
refs #1199 : Fix iclude
9 years ago
draekko
9085b08fe1
#1199 fixed handling deleting data, and adding iptc when injecting
9 years ago
Robin Mills
ea08a415f2
#1199 . Fixing msvc/64 build breakers (more size/long/uintXX_t conflicts).
9 years ago