virtualization/dev-libs/openssl/files/openssl-0.9.7g-mem-clr-ptr-cast.patch
geos_one 91fc009f40 add new libs
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/vmware@2787 6952d904-891a-0410-993b-d76249ca496b
2010-12-26 12:31:35 +00:00

20 lines
637 B
Diff

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;