diff options
author | Richard Levitte <levitte@openssl.org> | 2002-11-28 08:09:03 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-11-28 08:09:03 +0000 |
commit | 75e3026a14339f3818fe57281979b7ee85399d43 (patch) | |
tree | ec56a26b6c553d120df76142a2b6241ac322b4c9 /crypto/mem.c | |
parent | 0a3af9a4038045ba59bcf10a4f9e0b6bb5107cd8 (diff) |
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.c | 2 |
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); |