aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-06-09 22:11:23 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-05 12:43:08 +0200
commit08f49d5085f123f1c6f15c77252a24d5e7eaa797 (patch)
tree48453cc40b30d72d925dfcdbbe60f10e5b662aeb
parent5663dd666233ffc8b2b28a992433694196f2d46d (diff)
downloadffmpeg-08f49d5085f123f1c6f15c77252a24d5e7eaa797.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> (cherry picked from commit 314d10f7a60f1786c85da30a569be61e2b906fef) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/wmalosslessdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 87a672845e..02e1e8dfa1 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -185,7 +185,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);
}