[FFmpeg-cvslog] avformat/aaxdec: Check for empty segments

Michael Niedermayer git at videolan.org
Tue Jul 12 22:56:05 EEST 2022


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Jun 27 10:29:25 2022 +0200| [db31b3ea861c280e7fae282d06957ebd0d37c2d2] | committer: Michael Niedermayer

avformat/aaxdec: Check for empty segments

Fixes: Timeout
Fixes: 48154/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-5149094353436672

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db31b3ea861c280e7fae282d06957ebd0d37c2d2
---

 libavformat/aaxdec.c | 2 ++
 1 file changed, 2 insertions(+)

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 &&



More information about the ffmpeg-cvslog mailing list