[FFmpeg-cvslog] avutil/aes: Add () to protect the ROT() arguments

Michael Niedermayer git at videolan.org
Tue Feb 17 00:30:43 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Feb 17 00:22:42 2015 +0100| [52d1929000c3ae08e76fa1e74f14f26609289014] | committer: Michael Niedermayer

avutil/aes: Add () to protect the ROT() arguments

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavutil/aes.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/aes.c b/libavutil/aes.c
index 9eb2bb3..fd87060 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,



More information about the ffmpeg-cvslog mailing list