summaryrefslogtreecommitdiff
path: root/libavcodec/wmadec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-22 17:22:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-22 17:22:53 +0200
commit0a41da3e9d2090c562b752d086bcbd4dee69c796 (patch)
treeb020af05513ba8d508a7d2d095b1ef904da93454 /libavcodec/wmadec.c
parentafe09e490a30c97aad6736f99d186634c354eb34 (diff)
parentd785f6940144eb6ce4c24309ed034056b81395bc (diff)
downloadffmpeg-0a41da3e9d2090c562b752d086bcbd4dee69c796.tar.gz
Merge commit 'd785f6940144eb6ce4c24309ed034056b81395bc' into release/0.8
* commit 'd785f6940144eb6ce4c24309ed034056b81395bc': shorten: validate that the channel count in the header is not <= 0 matroskadec: request a read buffer for the wav header h264: check for luma and chroma bit depth being equal xxan: fix invalid memory access in xan_decode_frame_type0() wmadec: require block_align to be set. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmadec.c')
-rw-r--r--libavcodec/wmadec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index 11740203fb..16ef54e378 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -85,6 +85,11 @@ static int wma_decode_init(AVCodecContext * avctx)
int i, flags2;
uint8_t *extradata;
+ if (!avctx->block_align) {
+ av_log(avctx, AV_LOG_ERROR, "block_align is not set\n");
+ return AVERROR(EINVAL);
+ }
+
s->avctx = avctx;
/* extract flag infos */