]> git.sesse.net Git - ffmpeg/commitdiff
avformat/aaxdec: Check that segments table has been initialized
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 31 Jan 2021 21:05:18 +0000 (22:05 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 13 Mar 2021 20:02:31 +0000 (21:02 +0100)
Fixes: Timeout
Fixes: 29766/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-5635887566290944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/aaxdec.c

index 7d10e805ca3a36a67f309f0577c8b06a1eb3d8a7..c6d2d1c8d1151ff56b75b1bd2a63b85de0235208 100644 (file)
@@ -264,6 +264,11 @@ static int aax_read_header(AVFormatContext *s)
         }
     }
 
+    if (!a->segments[0].end) {
+        ret = AVERROR_INVALIDDATA;
+        goto fail;
+    }
+
     st = avformat_new_stream(s, NULL);
     if (!st) {
         ret = AVERROR(ENOMEM);