mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/avpacket: Check metadata key in av_packet_unpack_dictionary()
Fixes timeout Fixes: 501/clusterfuzz-testcase-5672752870588416 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a2ca9e11ff
commit
2c00b37302
|
@ -508,7 +508,7 @@ int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **di
|
||||||
const uint8_t *key = data;
|
const uint8_t *key = data;
|
||||||
const uint8_t *val = data + strlen(key) + 1;
|
const uint8_t *val = data + strlen(key) + 1;
|
||||||
|
|
||||||
if (val >= end)
|
if (val >= end || !*key)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
ret = av_dict_set(dict, key, val, 0);
|
ret = av_dict_set(dict, key, val, 0);
|
||||||
|
|
Loading…
Reference in New Issue