From: Dr. Stephen Henson Date: Mon, 24 Nov 2008 17:02:49 +0000 (+0000) Subject: Move new function CRYPTO_strdup to mem_dbg.c because mem.c is excluded in X-Git-Tag: OpenSSL_0_9_8j~30 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=516f76fd2cdc1a106230fe1a9ffe3437ba99fb09;p=oweals%2Fopenssl.git Move new function CRYPTO_strdup to mem_dbg.c because mem.c is excluded in a fips build. --- diff --git a/crypto/mem.c b/crypto/mem.c index 3d839b9610..00ebaf0b9b 100644 --- a/crypto/mem.c +++ b/crypto/mem.c @@ -341,14 +341,6 @@ void *CRYPTO_malloc(int num, const char *file, int line) return ret; } -char *CRYPTO_strdup(const char *str, const char *file, int line) - { - char *ret = CRYPTO_malloc(strlen(str)+1, file, line); - - strcpy(ret, str); - return ret; - } - void *CRYPTO_realloc(void *str, int num, const char *file, int line) { void *ret = NULL; diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c index 19376a1814..dfeb084799 100644 --- a/crypto/mem_dbg.c +++ b/crypto/mem_dbg.c @@ -807,3 +807,11 @@ void CRYPTO_malloc_debug_init(void) CRYPTO_dbg_pop_info, CRYPTO_dbg_remove_all_info); } + +char *CRYPTO_strdup(const char *str, const char *file, int line) + { + char *ret = CRYPTO_malloc(strlen(str)+1, file, line); + + strcpy(ret, str); + return ret; + }