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:
b28c678
)
wmaprodec: check min_samples_per_subframe
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 14 Apr 2012 11:13:32 +0000
(13:13 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 14 Apr 2012 11:13:48 +0000
(13:13 +0200)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/wmaprodec.c
patch
|
blob
|
history
diff --git
a/libavcodec/wmaprodec.c
b/libavcodec/wmaprodec.c
index
aa06826
..
8e7ef4c
100644
(file)
--- a/
libavcodec/wmaprodec.c
+++ b/
libavcodec/wmaprodec.c
@@
-335,6
+335,12
@@
static av_cold int decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
+ if (s->min_samples_per_subframe < (1<<WMAPRO_BLOCK_MIN_BITS)) {
+ av_log(avctx, AV_LOG_ERROR, "min_samples_per_subframe of %d too small\n",
+ s->min_samples_per_subframe);
+ return AVERROR_INVALIDDATA;
+ }
+
s->num_channels = avctx->channels;
if (s->num_channels < 0) {