From 52d1929000c3ae08e76fa1e74f14f26609289014 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 17 Feb 2015 00:22:42 +0100 Subject: [PATCH] avutil/aes: Add () to protect the ROT() arguments Signed-off-by: Michael Niedermayer --- libavutil/aes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/aes.c b/libavutil/aes.c index 9eb2bb393c..fd8706089c 100644 --- a/libavutil/aes.c +++ b/libavutil/aes.c @@ -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,