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>
release/5.1
Michael Niedermayer 3 years ago
parent 6265f0b4e1
commit 7ec28e1d4c
  1. 2
      libavformat/cafdec.c

@ -241,6 +241,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);
}
}

Loading…
Cancel
Save