From 49db96cd589f2d77df56dd00d1d87a37cdcd1a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Mon, 26 Mar 2018 00:29:11 +0200 Subject: [PATCH] [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 --- src/webpimage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webpimage.cpp b/src/webpimage.cpp index d1fc73e7..7aae52b8 100644 --- a/src/webpimage.cpp +++ b/src/webpimage.cpp @@ -490,7 +490,7 @@ namespace Exiv2 { 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