diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-15 17:44:18 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-15 20:58:36 +0100 |
commit | c2409a7c5b1c1f43ee8b00c13ed41edc0321db0b (patch) | |
tree | 28bc3a2be16b29929b8cb0d6e585c9a4f0e8b482 | |
parent | ea3eaa37b119f79f64fd6af2c24b81bb9e7dff6f (diff) | |
download | ffmpeg-c2409a7c5b1c1f43ee8b00c13ed41edc0321db0b.tar.gz |
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>
-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); } |