diff --git a/libavformat/apvdec.c b/libavformat/apvdec.c index 4a5592d98c..f8e3cf58cd 100644 --- a/libavformat/apvdec.c +++ b/libavformat/apvdec.c @@ -207,7 +207,7 @@ static int apv_read_packet(AVFormatContext *s, AVPacket *pkt) au_size = avio_rb32(s->pb); if (au_size == 0 && avio_feof(s->pb)) return AVERROR_EOF; - if (au_size == 0 || au_size > UINT32_MAX) { + if (au_size < 24 || au_size > 1 << 26) { av_log(s, AV_LOG_ERROR, "APV AU has invalid size: %"PRIu32"\n", au_size); return AVERROR_INVALIDDATA;