diff --git a/libavformat/aaxdec.c b/libavformat/aaxdec.c index dd1fbde736..4e352f8ce3 100644 --- a/libavformat/aaxdec.c +++ b/libavformat/aaxdec.c @@ -250,6 +250,8 @@ static int aax_read_header(AVFormatContext *s) start = avio_rb32(pb); size = avio_rb32(pb); + if (!size) + return AVERROR_INVALIDDATA; a->segments[r].start = start + a->data_offset; a->segments[r].end = a->segments[r].start + size; if (r &&