mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
Wait for all threads to be done in DecodeRemaining.
This could lead to a race condition. BUG=oss-fuzz:9417 Change-Id: Ifef4001115888541cb76095e1c0226487d497b78
This commit is contained in:
parent
4649b3c422
commit
907208f97e
@ -473,6 +473,12 @@ static VP8StatusCode DecodeRemaining(WebPIDecoder* const idec) {
|
|||||||
MemDataSize(&idec->mem_) > MAX_MB_SIZE) {
|
MemDataSize(&idec->mem_) > MAX_MB_SIZE) {
|
||||||
return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR);
|
return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR);
|
||||||
}
|
}
|
||||||
|
// Synchronize the threads.
|
||||||
|
if (dec->mt_method_ > 0) {
|
||||||
|
if (!WebPGetWorkerInterface()->Sync(&dec->worker_)) {
|
||||||
|
return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
RestoreContext(&context, dec, token_br);
|
RestoreContext(&context, dec, token_br);
|
||||||
return VP8_STATUS_SUSPENDED;
|
return VP8_STATUS_SUSPENDED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user