summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinoguchi <inoguchi@openbsd.org>2020-01-26 11:49:21 +0000
committerinoguchi <inoguchi@openbsd.org>2020-01-26 11:49:21 +0000
commit0129b77958a7353bbe2090837063228ec2751ab0 (patch)
treef837cd5bdd30b293ae97846c0cc798903b5f1aa9
parentRemove unused code from socket.c (diff)
downloadwireguard-openbsd-0129b77958a7353bbe2090837063228ec2751ab0.tar.xz
wireguard-openbsd-0129b77958a7353bbe2090837063228ec2751ab0.zip
Avoid 32 bit right shift with unsigned int in crypto/cast/cast_lcl.h
ok tb@
-rw-r--r--lib/libcrypto/cast/cast_lcl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/cast/cast_lcl.h b/lib/libcrypto/cast/cast_lcl.h
index ad4e2fede9f..100ff1f2d2c 100644
--- a/lib/libcrypto/cast/cast_lcl.h
+++ b/lib/libcrypto/cast/cast_lcl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cast_lcl.h,v 1.11 2015/11/05 21:46:51 miod Exp $ */
+/* $OpenBSD: cast_lcl.h,v 1.12 2020/01/26 11:49:21 inoguchi Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -145,7 +145,7 @@
*((c)++)=(unsigned char)(((l) )&0xff))
/* only invoked with 0 <= n <= 31 */
-#define ROTL(a,n) ((((a)<<(n))&0xffffffffL)|((a)>>(32-(n))))
+#define ROTL(a,n) ((((a)<<(n))&0xffffffffL)|((a)>>((32-(n))&31)))
#define C_M 0x3fc
#define C_0 22L