[FFmpeg-cvslog] swscale/utils: Fix undefined shift in initFilter()
Michael Niedermayer
git at videolan.org
Wed Mar 11 16:22:50 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Mar 11 15:40:28 2015 +0100| [fa74058dd36413aaa24c7e5982c66882d9dda6c1] | committer: Michael Niedermayer
swscale/utils: Fix undefined shift in initFilter()
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu at google.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa74058dd36413aaa24c7e5982c66882d9dda6c1
---
libswscale/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libswscale/utils.c b/libswscale/utils.c
index df8d0a9..fd0247d 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -384,7 +384,7 @@ static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
int j;
(*filterPos)[i] = xx;
for (j = 0; j < filterSize; j++) {
- int64_t d = (FFABS(((int64_t)xx << 17) - xDstInSrc)) << 13;
+ int64_t d = (FFABS(((int64_t)xx * (1 << 17)) - xDstInSrc)) << 13;
double floatd;
int64_t coeff;
More information about the ffmpeg-cvslog
mailing list