aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-08-06 13:32:54 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-08-13 01:07:21 +0200
commit96cf249751bb764199aa9a9c50bbd7f4724889cb (patch)
tree701d8eb2abde2f804f38d2120f7afa99d7c90166
parent30a2c1a1b83f1931fe728c28fb03b203b1aebec8 (diff)
downloadffmpeg-96cf249751bb764199aa9a9c50bbd7f4724889cb.tar.gz
avcodec/mpeg4videodec: Clear mcsel before decoding an image
Fixes: runtime error: signed integer overflow: 2146467840 + 1032192 cannot be represented in type 'int' Fixes: 2826/clusterfuzz-testcase-minimized-5901511613743104 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 7735ed29741d985e1e670249ca56e7a1ce18b729) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/mpeg4videodec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 060bed5817..8877ddf118 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -2272,6 +2272,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
int time_incr, time_increment;
int64_t pts;
+ s->mcsel = 0;
s->pict_type = get_bits(gb, 2) + AV_PICTURE_TYPE_I; /* pict type: I = 0 , P = 1 */
if (s->pict_type == AV_PICTURE_TYPE_B && s->low_delay &&
ctx->vol_control_parameters == 0 && !(s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY)) {