diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-16 03:31:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-16 03:37:44 +0100 |
commit | 20431a9982b9bd2c475042d919890a941ad70c71 (patch) | |
tree | 1815fa04b9b0b23bf3354c1a9f4f27e380e47680 /libavcodec/wmadec.c | |
parent | c1c836d9eb4f790146eb2aca24260982587f00ed (diff) | |
download | ffmpeg-20431a9982b9bd2c475042d919890a941ad70c71.tar.gz |
wma: Check channel number before init.
Fixes Ticket240
Based on patch by ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmadec.c')
-rw-r--r-- | libavcodec/wmadec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index bf6e7ee71e..40315d4291 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -109,6 +109,11 @@ static int wma_decode_init(AVCodecContext * avctx) } } + if(avctx->channels > MAX_CHANNELS){ + av_log(avctx, AV_LOG_ERROR, "Invalid number of channels (%d)\n", avctx->channels); + return -1; + } + if(ff_wma_init(avctx, flags2)<0) return -1; |