diff options
author | Richard Levitte <levitte@openssl.org> | 2002-11-28 09:04:36 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-11-28 09:04:36 +0100 |
commit | 4579924b7e55fccc7013e6de196f2e2ab175ce39 (patch) | |
tree | fa19611a704cc901d3ba338cefbbb98878de7ee5 /crypto/mem.c | |
parent | Unused variable removed. (diff) | |
download | openssl-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.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); |