Mercurial > libavcodec.hg
changeset 10240:ccd7a1882c92 libavcodec
check data_size in decode_frame()
author | michael |
---|---|
date | Wed, 23 Sep 2009 11:29:38 +0000 |
parents | 77246a6cffa0 |
children | 9335e435dde0 |
files | mpegaudiodec.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegaudiodec.c Wed Sep 23 10:45:14 2009 +0000 +++ b/mpegaudiodec.c Wed Sep 23 11:29:38 2009 +0000 @@ -2276,6 +2276,9 @@ avctx->bit_rate = s->bit_rate; avctx->sub_id = s->layer; + if(*data_size < 1152*avctx->channels*sizeof(OUT_INT)) + return -1; + if(s->frame_size<=0 || s->frame_size > buf_size){ av_log(avctx, AV_LOG_ERROR, "incomplete frame\n"); return -1;