From ac52613c1622df9aa8c1e64b427815be8ffdb316 Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Mon, 15 Dec 2008 23:01:54 +0000 Subject: Check extradata is large enough. Patch by Laurent Aimar fenrir \:/ via ecp fr Originally committed as revision 16157 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/rv10.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavcodec/rv10.c') diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 0c05147229..ad09c07a09 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; -- cgit v1.2.3