diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index f844a463ee..eaa327a3ee 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -1490,6 +1490,8 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, } if (i >= buf_size) return AVERROR_INVALIDDATA; + if (i > 10) + return i; buf += i; buf_size -= i;