ref: c40224631ad20d41f73fc78576dc770169004346
parent: 5fddd6397390d34b874e2f72249cbc5f84fc06d6
parent: 3fb6f75feb973a6c59a627c9375b431618fd5ee8
author: Harish Mahendrakar <harish.mahendrakar@ittiam.com>
date: Thu Dec 6 00:53:43 EST 2018
Merge "Fix DoS in Error Streams"
--- 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 @@
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);