summaryrefslogtreecommitdiff
path: root/libavcodec/wmaprodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-09 14:01:13 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-09 15:32:21 +0200
commit7d9cb126893d56ea7b4e1cf4715a7c5e6dc66ad6 (patch)
treee42e6230e0febb0784fa8ff9c9c46df9bca24c1f /libavcodec/wmaprodec.c
parent694550f18e026c1d7736a40961d080ec32a4c31b (diff)
avcodec/wmaprodec: Check block_align
Fixes undefined behavior Its not known if this condition can be triggered through crafted input. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmaprodec.c')
-rw-r--r--libavcodec/wmaprodec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index c4e0b0af63..ca57f64cda 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -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 */