1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avutil/softfloat: Fix multiple runtime error: left shift of negative value -8

Fixes: 1352/clusterfuzz-testcase-minimized-5757565017260032

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 35f3df0d76)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-05-06 00:13:05 +02:00
parent 955b97704f
commit 67835afd79

View File

@ -235,12 +235,12 @@ static av_unused void av_sincos_sf(int a, int *s, int *c)
int st, ct;
idx = a >> 26;
sign = (idx << 27) >> 31;
sign = (int32_t)((unsigned)idx << 27) >> 31;
cv = av_costbl_1_sf[idx & 0xf];
cv = (cv ^ sign) - sign;
idx -= 8;
sign = (idx << 27) >> 31;
sign = (int32_t)((unsigned)idx << 27) >> 31;
sv = av_costbl_1_sf[idx & 0xf];
sv = (sv ^ sign) - sign;