403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.217.33
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/security/mhash/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/security/mhash/files/patch-lib-ripemd.c
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) ((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) ((y)^((z)&((x)^(y))))
-#define f64(x,y,z) (x^(y|(~z)))
+#define f64(x,y,z) ((x)^((y)|(~(z))))
 
 #define K0  0x00000000
 #define K1  0x5A827999     /* 2^30 * sqrt(2) */
@@ -913,9 +913,9 @@
 #define EXTRACT_UCHAR(p)  (*(mutils_word8 *)(p))
 #endif
 
-#define STRING2INT(s) ((((((EXTRACT_UCHAR(s+3) << 8)    \
-			 | EXTRACT_UCHAR(s+2)) << 8)  \
-			 | EXTRACT_UCHAR(s+1)) << 8)  \
+#define STRING2INT(s) ((((((EXTRACT_UCHAR((s)+3) << 8)    \
+			 | EXTRACT_UCHAR((s)+2)) << 8)  \
+			 | EXTRACT_UCHAR((s)+1)) << 8)  \
 			 | EXTRACT_UCHAR(s))
 
 static void ripemd_block(struct ripemd_ctx *ctx, mutils_word8 *block)

Youez - 2016 - github.com/yon3zu
LinuXploit