diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-06-09 22:11:23 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-06-13 00:43:09 +0200 |
commit | 314d10f7a60f1786c85da30a569be61e2b906fef (patch) | |
tree | c93c49d0fc24c5bb4a7e940eda3b3876f5a40a67 | |
parent | aa88cdfd90f5da0683cd6556c75a5ba5740a1c27 (diff) | |
download | ffmpeg-314d10f7a60f1786c85da30a569be61e2b906fef.tar.gz |
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@niedermayer.cc>
-rw-r--r-- | libavcodec/wmalosslessdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index cfdd9e9a85..62d5fadf5d 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); } |