Blame SOURCES/qtimageformats-CVE-2020-36328.patch

169d7f
diff --git a/src/3rdparty/libwebp/src/dec/buffer_dec.c b/src/3rdparty/libwebp/src/dec/buffer_dec.c
169d7f
index c685fd5..ae5ba5d 100644
169d7f
--- a/src/3rdparty/libwebp/src/dec/buffer_dec.c
169d7f
+++ b/src/3rdparty/libwebp/src/dec/buffer_dec.c
169d7f
@@ -74,7 +74,8 @@ static VP8StatusCode CheckDecBuffer(const WebPDecBuffer* const buffer) {
169d7f
   } else {    // RGB checks
169d7f
     const WebPRGBABuffer* const buf = &buffer->u.RGBA;
169d7f
     const int stride = abs(buf->stride);
169d7f
-    const uint64_t size = MIN_BUFFER_SIZE(width, height, stride);
169d7f
+    const uint64_t size =
169d7f
+        MIN_BUFFER_SIZE(width * kModeBpp[mode], height, stride);
169d7f
     ok &= (size <= buf->size);
169d7f
     ok &= (stride >= width * kModeBpp[mode]);
169d7f
     ok &= (buf->rgba != NULL);