mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/wavarc: Fix k limit
The implementation does not support k=32 Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int' Fixes: 57976/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-5911925807775744 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
071c625ad7
commit
40cec0b465
@ -205,7 +205,7 @@ static int decode_1dif(AVCodecContext *avctx,
|
||||
if (block_type < 4 && block_type >= 0) {
|
||||
k = 1 + (avctx->sample_fmt == AV_SAMPLE_FMT_S16P);
|
||||
k = get_urice(gb, k) + 1;
|
||||
if (k > 32)
|
||||
if (k >= 32)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
@ -297,7 +297,7 @@ static int decode_2slp(AVCodecContext *avctx,
|
||||
if (block_type < 5 && block_type >= 0) {
|
||||
k = 1 + (avctx->sample_fmt == AV_SAMPLE_FMT_S16P);
|
||||
k = get_urice(gb, k) + 1;
|
||||
if (k > 32)
|
||||
if (k >= 32)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user