avcodec/ituh263dec: Check for the bitstream end in ff_h263_decode_mb()

Fixes invalid shift

Fixes: 670/clusterfuzz-testcase-4852021066727424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-02-25 21:07:23 +01:00
parent 489c09ad4b
commit 0716bcce5b
1 changed files with 3 additions and 0 deletions

View File

@ -962,6 +962,9 @@ intra:
} }
end: end:
if (get_bits_left(&s->gb) < 0)
return AVERROR_INVALIDDATA;
/* per-MB end of slice check */ /* per-MB end of slice check */
{ {
int v= show_bits(&s->gb, 16); int v= show_bits(&s->gb, 16);