ffmpeg | branch: release/4.4 | Michael Niedermayer <mich...@niedermayer.cc> | 
Mon Jun 27 10:29:25 2022 +0200| [23fb7097eedbf0844897b24dbc96fc04ccc8d0c6] | 
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 <mich...@niedermayer.cc>
(cherry picked from commit db31b3ea861c280e7fae282d06957ebd0d37c2d2)
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

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

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

diff --git a/libavformat/aaxdec.c b/libavformat/aaxdec.c
index e69e5615ee..ad893efadd 100644
--- a/libavformat/aaxdec.c
+++ b/libavformat/aaxdec.c
@@ -262,6 +262,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;
             } else {

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to