Commit 7157334c authored by Michael Niedermayer's avatar Michael Niedermayer

wmadec: prevent null pointer call.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1da254b8
......@@ -489,6 +489,11 @@ static int wma_decode_block(WMACodecContext *s)
s->block_len_bits = s->frame_len_bits;
}
if (s->frame_len_bits - s->block_len_bits >= s->nb_block_sizes){
av_log(s->avctx, AV_LOG_ERROR, "block_len_bits not initialized to a valid value\n");
return -1;
}
/* now check if the block length is coherent with the frame length */
s->block_len = 1 << s->block_len_bits;
if ((s->block_pos + s->block_len) > s->frame_len){
......
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