From 595bf7022afd2e7116bbfc0e1ee38c482e6d3811 Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 18 Aug 2022 17:51:19 -0700 Subject: [PATCH] vp9.read_inter_block_mode_info: return on corruption with block sizes < 8x8 previously only the inner loop was aborted. this could cause propagation of invalid motion vectors to scale_mv(). this quiets integer sanitizer warnings of the form: vp9/common/vp9_mvref_common.h:239:18: runtime error: implicit conversion from type 'int' of value 32768 (32-bit, signed) to type 'int16_t' (aka 'short') changed the value to -32768 (16-bit, signed) Bug: b/229626362 Change-Id: I58b5a425adf21542cbf4cc4dd5ab3cc5ed008264 --- vp9/decoder/vp9_decodemv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vp9/decoder/vp9_decodemv.c b/vp9/decoder/vp9_decodemv.c index 8a8d2ad..f4bfb78 100644 --- a/vp9/decoder/vp9_decodemv.c +++ b/vp9/decoder/vp9_decodemv.c @@ -755,7 +755,7 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi, if (!assign_mv(cm, xd, b_mode, mi->bmi[j].as_mv, best_ref_mvs, best_sub8x8, is_compound, allow_hp, r)) { xd->corrupted |= 1; - break; + return; } if (num_4x4_h == 2) mi->bmi[j + 2] = mi->bmi[j]; -- 2.7.4