exiv2
exiv2 copied to clipboard
Question about WebPImage::inject_VP8X
Does anybody here know why this -1
adjustment is needed in WebPImage::inject_VP8X
?
https://github.com/Exiv2/exiv2/blob/a5c521ea572fb7c3eba3437cf9b77e62bf39c19e/src/webpimage.cpp#L764
Most of the time, it looks like it's cancelling the corresponding +1
adjustments in WebPImage::doWriteMetadata
, like this one:
https://github.com/Exiv2/exiv2/blob/a5c521ea572fb7c3eba3437cf9b77e62bf39c19e/src/webpimage.cpp#L267
But there's no +1
adjustment here:
https://github.com/Exiv2/exiv2/blob/a5c521ea572fb7c3eba3437cf9b77e62bf39c19e/src/webpimage.cpp#L215
Which means that I can create a poc that causes w
to be negative in WebPImage::inject_VP8X
. Is that a bug? To run the poc:
exiv2 rm poc.webp
Nothing visibly bad happens. You need to set a breakpoint in WebPImage::inject_VP8X
to see that w == -1
.
No idea from my side 😅
width being negative sounds like a bug 🤷