diff options
Diffstat (limited to 'crypto/mem_clr.c')
-rw-r--r-- | crypto/mem_clr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/mem_clr.c b/crypto/mem_clr.c index 3df1f39..1a06636 100644 --- a/crypto/mem_clr.c +++ b/crypto/mem_clr.c @@ -66,6 +66,10 @@ void OPENSSL_cleanse(void *ptr, size_t len) { unsigned char *p = ptr; size_t loop = len, ctr = cleanse_ctr; + + if (ptr == NULL) + return; + while (loop--) { *(p++) = (unsigned char)ctr; ctr += (17 + ((size_t)p & 0xF)); |