diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-06-27 10:29:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-07-12 21:55:22 +0200 |
commit | db31b3ea861c280e7fae282d06957ebd0d37c2d2 (patch) | |
tree | 7cdf3f15446b94423b9ac7f88eed5f4d8063cc9b /libavformat | |
parent | 78b95530f0a1f04864079614b251b765b1ee77ec (diff) | |
download | ffmpeg-db31b3ea861c280e7fae282d06957ebd0d37c2d2.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>
Diffstat (limited to 'libavformat')
-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 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 && |