diff --git a/libavformat/aaxdec.c b/libavformat/aaxdec.c index 9b1c7933ae..09fe8ebdf7 100644 --- a/libavformat/aaxdec.c +++ b/libavformat/aaxdec.c @@ -249,6 +249,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 &&