[FFmpeg-cvslog] indeo5: check against scaleable frames in non scaleable streams.

Michael Niedermayer git at videolan.org
Sun Apr 22 12:30:50 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 22 12:09:59 2012 +0200| [fa5dacce143f3fbe8eac14d5a99e926b2787e9e6] | committer: Michael Niedermayer

indeo5: check against scaleable frames in non scaleable streams.

Fixes a null ptr dereference.

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=fa5dacce143f3fbe8eac14d5a99e926b2787e9e6
---

 libavcodec/indeo5.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
index 5614e80..1945f06 100644
--- a/libavcodec/indeo5.c
+++ b/libavcodec/indeo5.c
@@ -356,6 +356,12 @@ static int decode_pic_hdr(IVI5DecContext *ctx, AVCodecContext *avctx)
         ctx->gop_invalid = 0;
     }
 
+    if (ctx->frame_type == FRAMETYPE_INTER_SCAL && !ctx->is_scalable) {
+        av_log(avctx, AV_LOG_ERROR, "Scalable inter frame in non scaleable stream\n");
+        ctx->frame_type = FRAMETYPE_INTER;
+        return AVERROR_INVALIDDATA;
+    }
+
     if (ctx->frame_type != FRAMETYPE_NULL) {
         ctx->frame_flags = get_bits(&ctx->gb, 8);
 



More information about the ffmpeg-cvslog mailing list