Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-20 15:42:33 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-20 19:14:54 +0300
commit15ccaa344c4f645ae791aafecdef3d886e196127 (patch)
treecce386ede739cc96e0c5f9109cb8ad4af8e6f3a8 /libavcodec/mpegaudiodec_fixed.c
parent01d196a67dc55eb01cf3e06d6338c5d096a29b1c (diff)
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/mpegaudiodec_fixed.c')
-rw-r--r--libavcodec/mpegaudiodec_fixed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpegaudiodec_fixed.c b/libavcodec/mpegaudiodec_fixed.c
index 9421ffbe94..ad7ceb20b6 100644
--- a/libavcodec/mpegaudiodec_fixed.c
+++ b/libavcodec/mpegaudiodec_fixed.c
@@ -25,13 +25,13 @@
#include "mpegaudio.h"
-#define SHR(a,b) ((a)>>(b))
+#define SHR(a,b) (((int)(a))>>(b))
/* WARNING: only correct for positive numbers */
#define FIXR_OLD(a) ((int)((a) * FRAC_ONE + 0.5))
#define FIXR(a) ((int)((a) * FRAC_ONE + 0.5))
#define FIXHR(a) ((int)((a) * (1LL<<32) + 0.5))
#define MULH3(x, y, s) MULH((s)*(x), y)
-#define MULLx(x, y, s) MULL(x,y,s)
+#define MULLx(x, y, s) MULL((int)(x),(y),s)
#define RENAME(a) a ## _fixed
#define OUT_FMT AV_SAMPLE_FMT_S16
#define OUT_FMT_P AV_SAMPLE_FMT_S16P