summaryrefslogtreecommitdiff
path: root/security/mhash/files/patch-lib-ripemd.c
diff options
context:
space:
mode:
authorPeter Pentchev <roam@FreeBSD.org>2009-09-10 11:50:56 +0000
committerPeter Pentchev <roam@FreeBSD.org>2009-09-10 11:50:56 +0000
commitc2de38c91db1fae8482fc79a497f83da2e3c479f (patch)
tree7db938c9e7a88cd2262304cc71f323f04355f20c /security/mhash/files/patch-lib-ripemd.c
parentUpdate to the 20090908 snapshot of GCC 4.4.2. (diff)
Update to mhash-0.9.9.9.
Add descriptive headers to all the patches.
Diffstat (limited to 'security/mhash/files/patch-lib-ripemd.c')
-rw-r--r--security/mhash/files/patch-lib-ripemd.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/security/mhash/files/patch-lib-ripemd.c b/security/mhash/files/patch-lib-ripemd.c
index 77d52ca6ec52..48c2ba4e4331 100644
--- a/security/mhash/files/patch-lib-ripemd.c
+++ b/security/mhash/files/patch-lib-ripemd.c
@@ -1,17 +1,21 @@
-diff -urN -x .svn ../../branches/vendor/mhash/lib/ripemd.c ./lib/ripemd.c
---- ../../branches/vendor/mhash/lib/ripemd.c 2008-01-16 14:26:51.000000000 +0200
-+++ ./lib/ripemd.c 2008-01-16 15:02:04.000000000 +0200
+Description: Protect some macro parameters with parentheses.
+Author: Peter Pentchev <roam@FreeBSD.org>
+Forwarded: http://sourceforge.net/mailarchive/message.php?msg_name=20090910102100.GA26539%40straylight.m.ringlet.net
+Last-Update: 2009-09-10
+
+--- lib/ripemd.c.orig
++++ lib/ripemd.c
@@ -55,13 +55,13 @@
/* 32-bit rotate left - kludged with shifts */
#define ROTL(n,X) (((X)<<(n))|((X)>>(32-(n))))
-#define f0(x,y,z) (x^y^z)
+#define f0(x,y,z) ((x)^(y)^(z))
- //#define f16(x,y,z) ((x&y)|(~(x) & z))
+ /* #define f16(x,y,z) ((x&y)|(~(x) & z)) */
#define f16(x,y,z) ((z)^((x)&((y)^(z))))
-#define f32(x,y,z) ((x|~(y))^z)
+#define f32(x,y,z) (((x)|~(y))^(z))
- //#define f48(x,y,z) ((x&z)|(y&~(z)))
+ /* #define f48(x,y,z) ((x&z)|(y&~(z))) */
#define f48(x,y,z) ((y)^((z)&((x)^(y))))
-#define f64(x,y,z) (x^(y|(~z)))
+#define f64(x,y,z) ((x)^((y)|(~(z))))