mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/wavpack: Fix runtime error: shift exponent 32 is too large for 32-bit type 'int'
Fixes: 1967/clusterfuzz-testcase-minimized-5757031199801344 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
cd6f319a74
commit
8b3e580b7f
|
@ -188,7 +188,7 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb,
|
||||||
goto error;
|
goto error;
|
||||||
t += t2;
|
t += t2;
|
||||||
} else {
|
} else {
|
||||||
if (get_bits_left(gb) < t2 - 1)
|
if (t2 >= 32 || get_bits_left(gb) < t2 - 1)
|
||||||
goto error;
|
goto error;
|
||||||
t += get_bits_long(gb, t2 - 1) | (1 << (t2 - 1));
|
t += get_bits_long(gb, t2 - 1) | (1 << (t2 - 1));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue