mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
avcodec/nellymoser: Fix multiple left shift of negative value -8591
Fixes: 1342/clusterfuzz-testcase-minimized-5490842129137664 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 0953736b7e97f6e121a0587a95434bf1857a27da) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2871d8dbb5
commit
e488ad44aa
@ -85,7 +85,7 @@ const int16_t ff_nelly_delta_table[32] = {
|
||||
|
||||
static inline int signed_shift(int i, int shift) {
|
||||
if (shift > 0)
|
||||
return i << shift;
|
||||
return (unsigned)i << shift;
|
||||
return i >> -shift;
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ static int headroom(int *la)
|
||||
return 31;
|
||||
}
|
||||
l = 30 - av_log2(FFABS(*la));
|
||||
*la <<= l;
|
||||
*la *= 1<<l;
|
||||
return l;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user