diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-03-19 23:36:22 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-03-28 23:16:44 +0200 |
commit | f7dbbbdaf0b2cc36cd74b70ea3d8b924d3b5d2c3 (patch) | |
tree | 1b6fb1aa438217569cbea4337e05b8e6a04b2694 /libavformat | |
parent | 6d4c5f4e2b3c4101bcd026666855bf5d8bdbdd5b (diff) | |
download | ffmpeg-f7dbbbdaf0b2cc36cd74b70ea3d8b924d3b5d2c3.tar.gz |
avformat/cafdec: Do not store empty keys in read_info_chunk()
Fixes: Timeout
Fixes: 45543/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5684953164152832
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 7ec28e1d4cef723485f50f7a08859752b79b570c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/cafdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c index f23cf50640..3d9c48eaf8 100644 --- a/libavformat/cafdec.c +++ b/libavformat/cafdec.c @@ -235,6 +235,8 @@ static void read_info_chunk(AVFormatContext *s, int64_t size) char value[1024]; avio_get_str(pb, INT_MAX, key, sizeof(key)); avio_get_str(pb, INT_MAX, value, sizeof(value)); + if (!*key) + continue; av_dict_set(&s->metadata, key, value, 0); } } |