]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Check extradata is large enough.
authorbenoit <benoit@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 15 Dec 2008 23:01:54 +0000 (23:01 +0000)
committerbenoit <benoit@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 15 Dec 2008 23:01:54 +0000 (23:01 +0000)
Patch by Laurent Aimar fenrir \:/ via ecp fr

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16157 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/rv10.c

index 0c05147229397198d2fe898e308e06d953a70a4c..ad09c07a09f7a4cddd45a879d5308aeaf843766e 100644 (file)
@@ -527,6 +527,11 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx)
     MpegEncContext *s = avctx->priv_data;
     static int done=0;
 
+    if (avctx->extradata_size < 8) {
+        av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n");
+        return -1;
+    }
+
     MPV_decode_defaults(s);
 
     s->avctx= avctx;