summaryrefslogtreecommitdiff
blob: 854b32cd330923469594a0983a6231187e144db1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Make sure when we cast as a pointer we don't truncate.

Index: crypto/mem_clr.c
===================================================================
RCS file: /usr/local/src/openssl/cvs-tree/openssl/crypto/mem_clr.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- crypto/mem_clr.c	3 Dec 2002 16:06:40 -0000	1.2
+++ crypto/mem_clr.c	29 Apr 2005 14:26:59 -0000	1.3
@@ -68,7 +68,7 @@
 	while(loop--)
 		{
 		*(p++) = cleanse_ctr;
-		cleanse_ctr += (17 + (unsigned char)((int)p & 0xF));
+		cleanse_ctr += (17 + (unsigned char)((unsigned long)p & 0xF));
 		}
 	if(memchr(ptr, cleanse_ctr, len))
 		cleanse_ctr += 63;