diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-15 20:44:18 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-15 23:58:36 +0400 |
commit | c2409a7c5b1c1f43ee8b00c13ed41edc0321db0b (patch) | |
tree | 28bc3a2be16b29929b8cb0d6e585c9a4f0e8b482 /libavcodec/vmdav.c | |
parent | ea3eaa37b119f79f64fd6af2c24b81bb9e7dff6f (diff) |
vmdav: more complete check for block_align, prevent out of array access.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vmdav.c')
-rw-r--r-- | libavcodec/vmdav.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c index 63343fd2ee..6e92e18b00 100644 --- a/libavcodec/vmdav.c +++ b/libavcodec/vmdav.c @@ -497,7 +497,7 @@ static av_cold int vmdaudio_decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "invalid number of channels\n"); return AVERROR(EINVAL); } - if (avctx->block_align < 1) { + if (avctx->block_align < 1 || avctx->block_align % avctx->channels) { av_log(avctx, AV_LOG_ERROR, "invalid block align\n"); return AVERROR(EINVAL); } |