summaryrefslogtreecommitdiff
path: root/libavcodec/wmaprodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-14 13:13:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-14 13:13:48 +0200
commit9166f483c52e7e0a031a7bb149bea16aaa72f344 (patch)
tree456ecb0e23bec647e844145f416431f40418bd81 /libavcodec/wmaprodec.c
parentb28c678ba893876eb7a0c1768dea9dfa0fbeceb3 (diff)
wmaprodec: check min_samples_per_subframe
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmaprodec.c')
-rw-r--r--libavcodec/wmaprodec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index aa068264bd..8e7ef4cabd 100644
--- 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) {