avformat/wavdec: Avoid zeroing written to array

Fixes: OOM
Fixes: 26934/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5996784213819392

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2020-11-09 20:53:27 +01:00
parent 32d0561891
commit f26b5acfc0
1 changed files with 1 additions and 1 deletions

View File

@ -917,7 +917,7 @@ static int w64_read_header(AVFormatContext *s)
if (chunk_size == UINT32_MAX || (filesize >= 0 && chunk_size > filesize))
return AVERROR_INVALIDDATA;
value = av_mallocz(chunk_size + 1);
value = av_malloc(chunk_size + 1);
if (!value)
return AVERROR(ENOMEM);