git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
694550f
)
avcodec/wmaprodec: Check block_align
author
Michael Niedermayer
<michaelni@gmx.at>
Tue, 9 Jul 2013 12:01:13 +0000
(14:01 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 9 Jul 2013 13:32:21 +0000
(15:32 +0200)
Fixes undefined behavior
Its not known if this condition can be triggered through crafted input.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/wmaprodec.c
patch
|
blob
|
history
diff --git
a/libavcodec/wmaprodec.c
b/libavcodec/wmaprodec.c
index
c4e0b0a
..
ca57f64
100644
(file)
--- 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 */