check data_size in decode_frame()
backported r19986 by michael Originally committed as revision 21716 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
This commit is contained in:
parent
acac7858bd
commit
ab546a7463
@ -2287,6 +2287,9 @@ retry:
|
|||||||
avctx->bit_rate = s->bit_rate;
|
avctx->bit_rate = s->bit_rate;
|
||||||
avctx->sub_id = s->layer;
|
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){
|
if(s->frame_size<=0 || s->frame_size > buf_size){
|
||||||
av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
|
av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user