summaryrefslogtreecommitdiff
path: root/libavutil/aes.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-17 00:22:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-17 00:22:42 +0100
commit52d1929000c3ae08e76fa1e74f14f26609289014 (patch)
tree29e725a6aad8cf71210956b05a307892c6061e4e /libavutil/aes.c
parent06309fc704dc11445bd9f11c0db7e24879508462 (diff)
avutil/aes: Add () to protect the ROT() arguments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/aes.c')
-rw-r--r--libavutil/aes.c4
1 files 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,