Browse Source

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>
tags/n3.3.1
Michael Niedermayer 8 years ago
parent
commit
67835afd79
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavutil/softfloat.h

+ 2
- 2
libavutil/softfloat.h 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;



Loading…
Cancel
Save