From 7c0e60ebc4851aa47ed43444380b133b323bcbe8 Mon Sep 17 00:00:00 2001 From: benoit Date: Mon, 15 Dec 2008 23:01:54 +0000 Subject: [PATCH] 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 --- libavcodec/rv10.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.39.2