]> git.sesse.net Git - ffmpeg/commitdiff
avutil/aes: Add () to protect the ROT() arguments
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Feb 2015 23:22:42 +0000 (00:22 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Feb 2015 23:22:42 +0000 (00:22 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/aes.c

index 9eb2bb393cbcf1e4c18148e401d23e7c00858e15..fd8706089cf00ae7c4d1bfe3c38582edb24054af 100644 (file)
@@ -62,9 +62,9 @@ static uint32_t dec_multbl[4][256];
 #endif
 
 #if HAVE_BIGENDIAN
-#   define ROT(x, s) ((x >> s) | (x << (32-s)))
+#   define ROT(x, s) (((x) >> (s)) | ((x) << (32-(s))))
 #else
-#   define ROT(x, s) ((x << s) | (x >> (32-s)))
+#   define ROT(x, s) (((x) << (s)) | ((x) >> (32-(s))))
 #endif
 
 static inline void addkey(av_aes_block *dst, const av_aes_block *src,