OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5871adc
)
avformat/wavdec: Check chunk_size
author
李赞
<lizan@ruc.edu.cn>
Wed, 10 May 2017 12:55:34 +0000
(14:55 +0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Wed, 10 May 2017 13:21:17 +0000
(15:21 +0200)
Fixes integer overflow and out of array access
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/wavdec.c
patch
|
blob
|
history
diff --git
a/libavformat/wavdec.c
b/libavformat/wavdec.c
index
602ce97
..
81dbc9f
100644
(file)
--- a/
libavformat/wavdec.c
+++ b/
libavformat/wavdec.c
@@
-841,6
+841,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)