Commit 008f872f authored by Justin Ruggles's avatar Justin Ruggles

Only check frame size if the header is valid.

Originally committed as revision 21439 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent b52fcba9
......@@ -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