aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ituh263dec.c
diff options
context:
space:
mode:
authorKeiji Costantini <strites@gmail.com>2014-03-01 18:17:04 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-03-01 23:17:30 +0100
commit9514440337875e0c63b409abcd616b68c518283f (patch)
treee206ef0213547f2ec2c0e40da0e11557ac8166d8 /libavcodec/ituh263dec.c
parent700687ebe07ac8b7a5cf5fd2c4892ea07a827080 (diff)
downloadffmpeg-9514440337875e0c63b409abcd616b68c518283f.tar.gz
ituh263: reject b-frame with pp_time = 0
Avoid a division by 0 in ff_mpeg4_set_one_direct_mv. Sample-Id: 00000168-google Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/ituh263dec.c')
-rw-r--r--libavcodec/ituh263dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index e36521062f..98c8cfc137 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -750,6 +750,8 @@ int ff_h263_decode_mb(MpegEncContext *s,
}
if(IS_DIRECT(mb_type)){
+ if (!s->pp_time)
+ return AVERROR_INVALIDDATA;
s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT;
mb_type |= ff_mpeg4_set_direct_mv(s, 0, 0);
}else{