diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-06 00:13:05 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-14 12:20:15 +0200 |
commit | cff78c4cc437c3962f6c4d130907d0b8256be8ab (patch) | |
tree | 7ca0ca6ecf539d82a6b87da885cf84ee4fac2323 | |
parent | 2a6cad221b129e83ee3440815d5f54e3cb8a32af (diff) | |
download | ffmpeg-cff78c4cc437c3962f6c4d130907d0b8256be8ab.tar.gz |
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 35f3df0d76e28969fa77f2b865e2e40b3ba69722)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavutil/softfloat.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h index fa91d1e1cb..fed3e77f87 100644 --- a/libavutil/softfloat.h +++ b/libavutil/softfloat.h @@ -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; |