[FFmpeg-cvslog] indeo4: check ref_mb
Michael Niedermayer
git at videolan.org
Fri Mar 23 11:25:50 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Mar 23 11:03:53 2012 +0100| [aae44fb4cdfab4fae4d981d2fe1fd708f1dcf9bb] | committer: Michael Niedermayer
indeo4: check ref_mb
Fix NULL deref
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aae44fb4cdfab4fae4d981d2fe1fd708f1dcf9bb
---
libavcodec/indeo4.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index df80b11..1d280a0 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -517,7 +517,7 @@ static int decode_mb_info(IVI4DecContext *ctx, IVIBandDesc *band,
}
}
} else {
- if (band->inherit_mv) {
+ if (band->inherit_mv && ref_mb) {
mb->type = ref_mb->type; /* copy mb_type from corresponding reference mb */
} else if (ctx->frame_type == FRAMETYPE_INTRA) {
mb->type = 0; /* mb_type is always INTRA for intra-frames */
More information about the ffmpeg-cvslog
mailing list