summaryrefslogtreecommitdiff
path: root/libavcodec/rv10.c
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@via.ecp.fr>2008-12-15 23:01:54 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2008-12-15 23:01:54 +0000
commitac52613c1622df9aa8c1e64b427815be8ffdb316 (patch)
tree2943250ccdb4e3a3d38d244bea8734791f7090c9 /libavcodec/rv10.c
parent301cc4f37050ed5c08aec8de6d4e22ede2ce9a9f (diff)
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
Diffstat (limited to 'libavcodec/rv10.c')
-rw-r--r--libavcodec/rv10.c5
1 files changed, 5 insertions, 0 deletions
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;