Commit 7d9cb126 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/wmaprodec: Check block_align

Fixes undefined behavior
Its not known if this condition can be triggered through crafted input.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 694550f1
......@@ -306,6 +306,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
/** generic init */
s->log2_frame_size = av_log2(avctx->block_align) + 4;
if (s->log2_frame_size > 25) {
avpriv_request_sample(avctx, "Large block align");
return AVERROR_PATCHWELCOME;
}
/** frame info */
s->skip_frame = 1; /* skip first frame */
......
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