[FFmpeg-cvslog] avcodec/wmalosslessdec: Check block_align maximum
Michael Niedermayer
git at videolan.org
Tue Jul 7 21:41:04 EEST 2020
ffmpeg | branch: release/4.2 | Michael Niedermayer <michael at niedermayer.cc> | Tue Jun 9 22:11:23 2020 +0200| [9641fcb355cd26986218bfd9382348d524539061] | committer: Michael Niedermayer
avcodec/wmalosslessdec: Check block_align maximum
Fixes: Assertion failure
Fixes: 22737/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5958388889681920
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 314d10f7a60f1786c85da30a569be61e2b906fef)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9641fcb355cd26986218bfd9382348d524539061
---
libavcodec/wmalosslessdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 78b9b5c1fd..7251bc0d32 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -184,7 +184,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
unsigned int channel_mask;
int i, log2_max_num_subframes;
- if (avctx->block_align <= 0) {
+ if (avctx->block_align <= 0 || avctx->block_align > (1<<21)) {
av_log(avctx, AV_LOG_ERROR, "block_align is not set or invalid\n");
return AVERROR(EINVAL);
}
More information about the ffmpeg-cvslog
mailing list