From: benoit Date: Mon, 15 Dec 2008 23:01:54 +0000 (+0000) Subject: Check extradata is large enough. X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/ffmpeg.git/commitdiff_plain/7c0e60ebc4851aa47ed43444380b133b323bcbe8 Check extradata is large enough. Patch by Laurent Aimar fenrir \:/ via ecp fr git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16157 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 0c0514722..ad09c07a0 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -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;