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:
12fcc62
)
oggspeexparse: fix array overread
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 12 Dec 2012 10:20:55 +0000
(11:20 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 12 Dec 2012 10:21:23 +0000
(11:21 +0100)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/oggparsespeex.c
patch
|
blob
|
history
diff --git
a/libavformat/oggparsespeex.c
b/libavformat/oggparsespeex.c
index
42480a3
..
63e6370
100644
(file)
--- a/
libavformat/oggparsespeex.c
+++ b/
libavformat/oggparsespeex.c
@@
-58,6
+58,11
@@
static int speex_header(AVFormatContext *s, int idx) {
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = AV_CODEC_ID_SPEEX;
+ if (os->psize < 68) {
+ av_log(s, AV_LOG_ERROR, "speex packet too small\n");
+ return AVERROR_INVALIDDATA;
+ }
+
st->codec->sample_rate = AV_RL32(p + 36);
st->codec->channels = AV_RL32(p + 48);
if (st->codec->channels < 1 || st->codec->channels > 2) {