diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-06-27 10:29:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-09-01 00:41:28 +0200 |
commit | 024b94bab3e8960d60025cf155d16cad96dc5ba2 (patch) | |
tree | e92a932b66a0e5d100b29730b8c84e7fc823a3bb | |
parent | 89685f280a6b256f798788a7b463daeddf8bf631 (diff) | |
download | ffmpeg-024b94bab3e8960d60025cf155d16cad96dc5ba2.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 9b1c7933ae..09fe8ebdf7 100644 --- a/libavformat/aaxdec.c +++ b/libavformat/aaxdec.c @@ -249,6 +249,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 && |