mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
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>
This commit is contained in:
parent
ea3eaa37b1
commit
c2409a7c5b
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user