summaryrefslogtreecommitdiffstats
path: root/crypto/mem.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-11-28 09:04:36 +0100
committerRichard Levitte <levitte@openssl.org>2002-11-28 09:04:36 +0100
commit4579924b7e55fccc7013e6de196f2e2ab175ce39 (patch)
treefa19611a704cc901d3ba338cefbbb98878de7ee5 /crypto/mem.c
parentUnused variable removed. (diff)
downloadopenssl-4579924b7e55fccc7013e6de196f2e2ab175ce39.tar.xz
openssl-4579924b7e55fccc7013e6de196f2e2ab175ce39.zip
Cleanse memory using the new OPENSSL_cleanse() function.
I've covered all the memset()s I felt safe modifying, but may have missed some.
Diffstat (limited to 'crypto/mem.c')
-rw-r--r--crypto/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/mem.c b/crypto/mem.c
index 46a00697ce..d7d3cda5dc 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -343,7 +343,7 @@ void *CRYPTO_realloc_clean(void *str, int old_len, int num, const char *file,
ret=malloc_ex_func(num,file,line);
if(ret)
memcpy(ret,str,old_len);
- memset(str,'\0',old_len);
+ OPENSSL_cleanse(str,old_len);
free_func(str);
#ifdef LEVITTE_DEBUG_MEM
fprintf(stderr, "LEVITTE_DEBUG_MEM: | 0x%p -> 0x%p (%d)\n", str, ret, num);