mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
avformat/wavdec: Consider AV_INPUT_BUFFER_PADDING_SIZE in set_spdif()
The buffer is read by using the bit reader
Fixes: out of array read
Fixes: 27539/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-5650565572591616
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 0a7c648e2d
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0146375f9a
commit
b3a9f2dfbf
@ -72,7 +72,7 @@ static void set_spdif(AVFormatContext *s, WAVDemuxContext *wav)
|
||||
if (ret < 0)
|
||||
goto end;
|
||||
|
||||
buf = av_malloc(len);
|
||||
buf = av_malloc(len + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!buf) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
|
Loading…
Reference in New Issue
Block a user