Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-03-20 01:36:22 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-04-07 17:27:00 +0300
commit64a756b8f5abfb819674e6268321dae9d324df26 (patch)
tree7ac0eb23bc228666cfc17927ef4bbf846bf04a4a /libavformat
parenta882801bc3b1f7b57b6e129510af3a6e92866772 (diff)
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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index b9260c9074..f0fd326fb6 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -243,6 +243,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);
}
}