Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-16 06:31:25 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-11-19 00:05:12 +0400
commitfdd09e5d7b2b0fff9458e287c41aea2e89359b23 (patch)
tree19f8e617123c95b213ece66c83ad591fafa35cd2
parent00d35e82b2500f69db9d482db76e8c2f53521f2d (diff)
wma: Check channel number before init.
Fixes Ticket240 Based on patch by ami_stuff Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 20431a9982b9bd2c475042d919890a941ad70c71) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/wmadec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index 9eaf230b01..11895a3996 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;