Commit 5c734382 authored by jbr's avatar jbr

Only check frame size if the header is valid.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21439 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 613c2c47
......@@ -1237,7 +1237,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
err = parse_frame_header(s);
/* check that reported frame size fits in input buffer */
if(s->frame_size > buf_size) {
if(!err && s->frame_size > buf_size) {
av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
err = AAC_AC3_PARSE_ERROR_FRAME_SIZE;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment