avcodec/g723_1dec: Fix overflow in shift
Fixes: shift exponent 1008 is too large for 32-bit type 'int'
Fixes: 17700/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G723_1_fuzzer-5707633436131328
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 07732f12a4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
4d392fc27c
commit
dfcd3ad2bc
1 changed files with 2 additions and 0 deletions
|
|
@ -668,6 +668,8 @@ static int estimate_sid_gain(G723_1_Context *p)
|
|||
else t = INT32_MAX;
|
||||
} else
|
||||
t = p->sid_gain << shift;
|
||||
} else if(shift < -31) {
|
||||
t = (p->sid_gain < 0) ? -1 : 0;
|
||||
}else
|
||||
t = p->sid_gain >> -shift;
|
||||
x = av_clipl_int32(t * (int64_t)cng_filt[0] >> 16);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue