diff options
Diffstat (limited to 'crypto/mem.c')
-rw-r--r-- | crypto/mem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/mem.c b/crypto/mem.c index 2ce3e89..fdad49b 100644 --- a/crypto/mem.c +++ b/crypto/mem.c @@ -365,6 +365,9 @@ char *CRYPTO_strdup(const char *str, const char *file, int line) { char *ret = CRYPTO_malloc(strlen(str) + 1, file, line); + if (ret == NULL) + return NULL; + strcpy(ret, str); return ret; } |