Blame SOURCES/qtimageformats-CVE-2018-25014.patch

169d7f
diff --git a/src/3rdparty/libwebp/src/dec/idec_dec.c b/src/3rdparty/libwebp/src/dec/idec_dec.c
169d7f
index 78fb2e7..cf7e182 100644
169d7f
--- a/src/3rdparty/libwebp/src/dec/idec_dec.c
169d7f
+++ b/src/3rdparty/libwebp/src/dec/idec_dec.c
169d7f
@@ -473,6 +473,12 @@ static VP8StatusCode DecodeRemaining(WebPIDecoder* const idec) {
169d7f
             MemDataSize(&idec->mem_) > MAX_MB_SIZE) {
169d7f
           return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR);
169d7f
         }
169d7f
+        // Synchronize the threads.
169d7f
+        if (dec->mt_method_ > 0) {
169d7f
+          if (!WebPGetWorkerInterface()->Sync(&dec->worker_)) {
169d7f
+            return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR);
169d7f
+          }
169d7f
+        }
169d7f
         RestoreContext(&context, dec, token_br);
169d7f
         return VP8_STATUS_SUSPENDED;
169d7f
       }