Mercurial > libavcodec.hg
changeset 8345:5d41a95e6a75 libavcodec
Check extradata is large enough.
Patch by Laurent Aimar fenrir \:/ via ecp fr
author | benoit |
---|---|
date | Mon, 15 Dec 2008 23:01:54 +0000 |
parents | 844463c05193 |
children | 899a12113af5 |
files | rv10.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rv10.c Mon Dec 15 22:48:10 2008 +0000 +++ b/rv10.c Mon Dec 15 23:01:54 2008 +0000 @@ -527,6 +527,11 @@ 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;