[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
v0.27.3
Dan Čermák 7 years ago
parent be992520b1
commit 49db96cd58

@ -490,7 +490,7 @@ namespace Exiv2 {
io_->read(data, WEBP_TAG_SIZE * 3); io_->read(data, WEBP_TAG_SIZE * 3);
WebPImage::decodeChunks(Exiv2::getULong(data + WEBP_TAG_SIZE, littleEndian) + 12); WebPImage::decodeChunks(Exiv2::getULong(data + WEBP_TAG_SIZE, littleEndian) + 8);
} // WebPImage::readMetadata } // WebPImage::readMetadata

Loading…
Cancel
Save