diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-06-27 10:29:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-09-25 13:51:44 +0200 |
commit | 23fb7097eedbf0844897b24dbc96fc04ccc8d0c6 (patch) | |
tree | c9bbc6cb045e7cca37b13a701fc12609258d2251 | |
parent | 7fe75d51fe86e34dbe61d46590282c940b034459 (diff) | |
download | ffmpeg-23fb7097eedbf0844897b24dbc96fc04ccc8d0c6.tar.gz |
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@niedermayer.cc>
(cherry picked from commit db31b3ea861c280e7fae282d06957ebd0d37c2d2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/aaxdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 { |