Commit 20431a99 authored by Michael Niedermayer's avatar Michael Niedermayer

wma: Check channel number before init.

Fixes Ticket240

Based on patch by ami_stuff
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c1c836d9
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment