summaryrefslogtreecommitdiff
path: root/vp9/common
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2018-12-06 05:53:43 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-12-06 05:53:43 +0000
commitc40224631ad20d41f73fc78576dc770169004346 (patch)
treeab0bab5367a11ae56ff086a2e38d2a8962904092 /vp9/common
parent5fddd6397390d34b874e2f72249cbc5f84fc06d6 (diff)
parent3fb6f75feb973a6c59a627c9375b431618fd5ee8 (diff)
downloadlibvpx-c40224631ad20d41f73fc78576dc770169004346.tar
libvpx-c40224631ad20d41f73fc78576dc770169004346.tar.gz
libvpx-c40224631ad20d41f73fc78576dc770169004346.tar.bz2
libvpx-c40224631ad20d41f73fc78576dc770169004346.zip
Merge "Fix DoS in Error Streams"
Diffstat (limited to 'vp9/common')
-rw-r--r--vp9/common/vp9_thread_common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/vp9/common/vp9_thread_common.c b/vp9/common/vp9_thread_common.c
index 36530fae6..ba9aa69d0 100644
--- a/vp9/common/vp9_thread_common.c
+++ b/vp9/common/vp9_thread_common.c
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <limits.h>
#include "./vpx_config.h"
#include "vpx_dsp/vpx_dsp_common.h"
#include "vpx_mem/vpx_mem.h"
@@ -402,6 +403,11 @@ static int get_next_row(VP9_COMMON *cm, VP9LfSync *lf_sync) {
pthread_mutex_unlock(&lf_sync->recon_done_mutex[cur_row]);
pthread_mutex_lock(&lf_sync->lf_mutex);
if (lf_sync->corrupted) {
+ int row = return_val >> MI_BLOCK_SIZE_LOG2;
+ pthread_mutex_lock(&lf_sync->mutex[row]);
+ lf_sync->cur_sb_col[row] = INT_MAX;
+ pthread_cond_signal(&lf_sync->cond[row]);
+ pthread_mutex_unlock(&lf_sync->mutex[row]);
return_val = -1;
}
pthread_mutex_unlock(&lf_sync->lf_mutex);