[FFmpeg-cvslog] avutil/intmath: fix undefined behavior in ff_ctzll_c()

Michael Niedermayer git at videolan.org
Thu Oct 22 14:21:06 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Oct 22 14:10:10 2015 +0200| [00efaa798377502657d2f0267b5b62a4d05af195] | committer: Michael Niedermayer

avutil/intmath: fix undefined behavior in ff_ctzll_c()

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=00efaa798377502657d2f0267b5b62a4d05af195
---

 libavutil/intmath.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/intmath.h b/libavutil/intmath.h
index 5a10d02..2016723 100644
--- a/libavutil/intmath.h
+++ b/libavutil/intmath.h
@@ -131,7 +131,7 @@ static av_always_inline av_const int ff_ctzll_c(long long v)
         63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,
         51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12
     };
-    return debruijn_ctz64[(uint64_t)((v & -v) * 0x022FDD63CC95386D) >> 58];
+    return debruijn_ctz64[(uint64_t)((v & -v) * 0x022FDD63CC95386DU) >> 58];
 }
 #endif
 



More information about the ffmpeg-cvslog mailing list