diff options
author | Viktor Dukhovni <openssl-users@dukhovni.org> | 2016-01-28 19:04:49 -0500 |
---|---|---|
committer | Viktor Dukhovni <openssl-users@dukhovni.org> | 2016-01-28 21:39:46 -0500 |
commit | 35ade23b02a02b5514941586030016b67ac0934e (patch) | |
tree | 745788e524c0dec6c4373a8d52f45707a50ed854 /crypto/rc5 | |
parent | 987157f6f63fa70dbeffca3c8bc62f26e9767ff2 (diff) | |
download | openssl-35ade23b02a02b5514941586030016b67ac0934e.tar.gz |
Keep RC5 bit shifts in [0..31]
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/rc5')
-rw-r--r-- | crypto/rc5/rc5_locl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/rc5/rc5_locl.h b/crypto/rc5/rc5_locl.h index 9944440334..6b34f923a6 100644 --- a/crypto/rc5/rc5_locl.h +++ b/crypto/rc5/rc5_locl.h @@ -170,10 +170,10 @@ # endif #endif #ifndef ROTATE_l32 -# define ROTATE_l32(a,n) (((a)<<(n&0x1f))|(((a)&0xffffffff)>>(32-(n&0x1f)))) +# define ROTATE_l32(a,n) (((a)<<(n&0x1f))|(((a)&0xffffffff)>>((32-n)&0x1f))) #endif #ifndef ROTATE_r32 -# define ROTATE_r32(a,n) (((a)<<(32-(n&0x1f)))|(((a)&0xffffffff)>>(n&0x1f))) +# define ROTATE_r32(a,n) (((a)<<((32-n)&0x1f))|(((a)&0xffffffff)>>(n&0x1f))) #endif #define RC5_32_MASK 0xffffffffL |