[FFmpeg-devel] [PATCH] avcodec/simple_idct_template: fix integer overflow

Paul B Mahol onemda at gmail.com
Fri Dec 13 16:22:17 EET 2019


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavcodec/simple_idct_template.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/simple_idct_template.c b/libavcodec/simple_idct_template.c
index d8fcfd7c53..5ddd0b45a2 100644
--- a/libavcodec/simple_idct_template.c
+++ b/libavcodec/simple_idct_template.c
@@ -121,7 +121,7 @@ static inline void FUNC6(idctRowCondDC)(idctin *row, int extra_shift)
 // TODO: Add DC-only support for int32_t input
 #if IN_IDCT_DEPTH == 16
 #if HAVE_FAST_64BIT
-#define ROW0_MASK (0xffffLL << 48 * HAVE_BIGENDIAN)
+#define ROW0_MASK (0xffffULL << 48 * HAVE_BIGENDIAN)
     if (((AV_RN64A(row) & ~ROW0_MASK) | AV_RN64A(row+4)) == 0) {
         uint64_t temp;
         if (DC_SHIFT - extra_shift >= 0) {
-- 
2.17.1



More information about the ffmpeg-devel mailing list