* https://www.openssl.org/source/license.html
*/
-#include <limits.h>
#include "e_os.h"
+#include <limits.h>
#include <openssl/crypto.h>
#include "internal/cryptlib.h"
#include "internal/o_str.h"
char *CRYPTO_strdup(const char *str, const char* file, int line)
{
char *ret;
- size_t size;
if (str == NULL)
return NULL;
- size = strlen(str) + 1;
- ret = CRYPTO_malloc(size, file, line);
+ ret = CRYPTO_malloc(strlen(str) + 1, file, line);
if (ret != NULL)
- memcpy(ret, str, size);
+ strcpy(ret, str);
return ret;
}