aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ituh263dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-25 21:07:23 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-26 17:16:22 +0100
commit0716bcce5bdc6299da2966f34cb62eba3f709be8 (patch)
tree78aeb34a3aa7852365c5fa5c79f63fa47730aabd /libavcodec/ituh263dec.c
parent489c09ad4b1a0753310a0f0391640f00621fe76e (diff)
downloadffmpeg-0716bcce5bdc6299da2966f34cb62eba3f709be8.tar.gz
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>
Diffstat (limited to 'libavcodec/ituh263dec.c')
-rw-r--r--libavcodec/ituh263dec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 09b6a2f17d..e39338870f 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -962,6 +962,9 @@ intra:
}
end:
+ if (get_bits_left(&s->gb) < 0)
+ return AVERROR_INVALIDDATA;
+
/* per-MB end of slice check */
{
int v= show_bits(&s->gb, 16);