diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-31 23:31:56 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-31 23:31:56 +0200 |
commit | 5216245a2c5ed8140d99f14fcc148fbb6db9831e (patch) | |
tree | e53e1f8b0162d60900b278443fde75ca09e4a7ed /libavcodec/indeo4.c | |
parent | 6bd974458245ac0ab51a2498d01943492a5b9ebe (diff) | |
download | ffmpeg-5216245a2c5ed8140d99f14fcc148fbb6db9831e.tar.gz |
indeo4: fix null ptr dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/indeo4.c')
-rw-r--r-- | libavcodec/indeo4.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c index 3dd58dc93b..0fe5f8fb5c 100644 --- a/libavcodec/indeo4.c +++ b/libavcodec/indeo4.c @@ -519,7 +519,7 @@ static int decode_mb_info(IVI4DecContext *ctx, IVIBandDesc *band, } mb->mv_x = mb->mv_y = 0; /* no motion vector coded */ - if (band->inherit_mv) { + if (band->inherit_mv && ref_mb) { /* motion vector inheritance */ if (mv_scale) { mb->mv_x = ivi_scale_mv(ref_mb->mv_x, mv_scale); @@ -553,7 +553,7 @@ static int decode_mb_info(IVI4DecContext *ctx, IVIBandDesc *band, if (!mb->type) { mb->mv_x = mb->mv_y = 0; /* there is no motion vector in intra-macroblocks */ } else { - if (band->inherit_mv) { + if (band->inherit_mv && ref_mb) { /* motion vector inheritance */ if (mv_scale) { mb->mv_x = ivi_scale_mv(ref_mb->mv_x, mv_scale); |