mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-23 15:53:08 +00:00
avcodec/bonk: Fix undefined overflow in predictor_calc_error()
Fixes: signed integer overflow: -2146469728 - 1488954 cannot be represented in type 'int' Fixes: 62490/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BONK_fuzzer-5612782399389696 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
ef3b42738b
commit
cd66606a8f
@ -270,7 +270,7 @@ static inline int shift(int a, int b)
|
|||||||
|
|
||||||
static int predictor_calc_error(int *k, int *state, int order, int error)
|
static int predictor_calc_error(int *k, int *state, int order, int error)
|
||||||
{
|
{
|
||||||
int i, x = error - shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT);
|
int i, x = error - (unsigned)shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT);
|
||||||
int *k_ptr = &(k[order-2]),
|
int *k_ptr = &(k[order-2]),
|
||||||
*state_ptr = &(state[order-2]);
|
*state_ptr = &(state[order-2]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user