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:
e079661
)
avformat/mpc8: clear buffer padding area
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 23 Dec 2013 17:09:58 +0000
(18:09 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 25 Dec 2013 22:54:27 +0000
(23:54 +0100)
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fa6a48cd1d5_8853_sv8_notags.mpc
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mpc8.c
patch
|
blob
|
history
diff --git
a/libavformat/mpc8.c
b/libavformat/mpc8.c
index
0e9baaa
..
502eaff
100644
(file)
--- a/
libavformat/mpc8.c
+++ b/
libavformat/mpc8.c
@@
-157,6
+157,8
@@
static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
if(!(buf = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE)))
return;
avio_read(s->pb, buf, size);
+ memset(buf+size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+
init_get_bits(&gb, buf, size * 8);
size = gb_get_v(&gb);
if(size > UINT_MAX/4 || size > c->samples/1152){