mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-02 20:35:37 +02:00
avformat/wavdec: Check avio_get_str16le() for failure
Fixes: out of array access Fixes: 29195/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5037853281222656 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
47be08640c
commit
d7594ee751
@ -922,6 +922,10 @@ static int w64_read_header(AVFormatContext *s)
|
|||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
ret = avio_get_str16le(pb, chunk_size, value, chunk_size);
|
ret = avio_get_str16le(pb, chunk_size, value, chunk_size);
|
||||||
|
if (ret < 0) {
|
||||||
|
av_free(value);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
avio_skip(pb, chunk_size - ret);
|
avio_skip(pb, chunk_size - ret);
|
||||||
|
|
||||||
av_dict_set(&s->metadata, chunk_key, value, AV_DICT_DONT_STRDUP_VAL);
|
av_dict_set(&s->metadata, chunk_key, value, AV_DICT_DONT_STRDUP_VAL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user