diff mbox series

[FFmpeg-devel,3/5] avformat/aaxdec: Check that segments table has been initialized

Message ID 20210131215605.28190-3-michael@niedermayer.cc
State Accepted
Commit 4e7dbca74c1395082947bb1586c1da47f50b1d18
Headers show
Series [FFmpeg-devel,1/5] avformat/sbgdec: Use av_sat_add64() in str_to_time() | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Michael Niedermayer Jan. 31, 2021, 9:56 p.m. UTC
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 | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/libavformat/aaxdec.c b/libavformat/aaxdec.c
index 7d10e805ca..c6d2d1c8d1 100644
--- a/libavformat/aaxdec.c
+++ b/libavformat/aaxdec.c
@@ -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);