diff options
author | James Zern <jzern@google.com> | 2022-08-18 17:51:19 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2022-08-19 09:58:39 -0700 |
commit | 595bf7022afd2e7116bbfc0e1ee38c482e6d3811 (patch) | |
tree | dfad7a9f81a5f9df0bb4d68cfe9e1cde424c6531 | |
parent | cf5ef2b9855da4502833a2832872607ed665fd72 (diff) | |
download | libvpx-595bf7022afd2e7116bbfc0e1ee38c482e6d3811.tar libvpx-595bf7022afd2e7116bbfc0e1ee38c482e6d3811.tar.gz libvpx-595bf7022afd2e7116bbfc0e1ee38c482e6d3811.tar.bz2 libvpx-595bf7022afd2e7116bbfc0e1ee38c482e6d3811.zip |
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
-rw-r--r-- | vp9/decoder/vp9_decodemv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vp9/decoder/vp9_decodemv.c b/vp9/decoder/vp9_decodemv.c index 8a8d2ad86..f4bfb785f 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]; |