mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avformat/wavdec: Check chunk_size
Fixes integer overflow and out of array access Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 3d232196372f309a75ed074c4cef30578eec1782) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
7bbd92f69d
commit
37f59340bb
@ -747,6 +747,8 @@ static int w64_read_header(AVFormatContext *s)
|
||||
chunk_key[4] = 0;
|
||||
avio_read(pb, chunk_key, 4);
|
||||
chunk_size = avio_rl32(pb);
|
||||
if (chunk_size == UINT32_MAX)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
value = av_mallocz(chunk_size + 1);
|
||||
if (!value)
|
||||
|
Loading…
x
Reference in New Issue
Block a user