diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-20 13:42:33 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-20 17:14:54 +0100 |
commit | 15ccaa344c4f645ae791aafecdef3d886e196127 (patch) | |
tree | cce386ede739cc96e0c5f9109cb8ad4af8e6f3a8 /libavcodec/mpegaudiodsp_template.c | |
parent | 01d196a67dc55eb01cf3e06d6338c5d096a29b1c (diff) | |
download | ffmpeg-15ccaa344c4f645ae791aafecdef3d886e196127.tar.gz |
avcodec/mpegaudiodec: Eliminate many undefined operations
Fixes: 625/clusterfuzz-testcase-4574924406521856
Fixes: 626/clusterfuzz-testcase-4738718621499392
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mpegaudiodsp_template.c')
-rw-r--r-- | libavcodec/mpegaudiodsp_template.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/mpegaudiodsp_template.c b/libavcodec/mpegaudiodsp_template.c index 62454ca306..04b8be2f05 100644 --- a/libavcodec/mpegaudiodsp_template.c +++ b/libavcodec/mpegaudiodsp_template.c @@ -63,8 +63,8 @@ static inline int round_sample(int64_t *sum) # define MACS(rt, ra, rb) MAC64(rt, ra, rb) # define MLSS(rt, ra, rb) MLS64(rt, ra, rb) # define MULH3(x, y, s) MULH((s)*(x), y) -# define MULLx(x, y, s) MULL(x,y,s) -# define SHR(a,b) ((a)>>(b)) +# define MULLx(x, y, s) MULL((int)(x),(y),s) +# define SHR(a,b) (((int)(a))>>(b)) # define FIXR(a) ((int)((a) * FRAC_ONE + 0.5)) # define FIXHR(a) ((int)((a) * (1LL<<32) + 0.5)) #endif @@ -300,11 +300,11 @@ static const INTFLOAT icos36h[9] = { }; /* using Lee like decomposition followed by hand coded 9 points DCT */ -static void imdct36(INTFLOAT *out, INTFLOAT *buf, INTFLOAT *in, INTFLOAT *win) +static void imdct36(INTFLOAT *out, INTFLOAT *buf, SUINTFLOAT *in, INTFLOAT *win) { int i, j; - INTFLOAT t0, t1, t2, t3, s0, s1, s2, s3; - INTFLOAT tmp[18], *tmp1, *in1; + SUINTFLOAT t0, t1, t2, t3, s0, s1, s2, s3; + SUINTFLOAT tmp[18], *tmp1, *in1; for (i = 17; i >= 1; i--) in[i] += in[i-1]; |