virtualization/dev-libs/openssl/files/openssl-0.9.7g-mem-clr-ptr-cast.patch

20 lines
637 B
Diff
Raw Normal View History

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;