projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ec/ecp_nistp*.c: sanitize for undefined/implmentation-specific behaviour.
[openssl.git]
/
crypto
/
o_str.c
diff --git
a/crypto/o_str.c
b/crypto/o_str.c
index c762b7009bbf52b3f1e0a4284c2015016f3a221f..a8357691ad66e9b668e28acad5f3b45eddab8fb8 100644
(file)
--- a/
crypto/o_str.c
+++ b/
crypto/o_str.c
@@
-7,8
+7,8
@@
* https://www.openssl.org/source/license.html
*/
* https://www.openssl.org/source/license.html
*/
+#include "e_os.h"
#include <limits.h>
#include <limits.h>
-#include <e_os.h>
#include <openssl/crypto.h>
#include "internal/cryptlib.h"
#include "internal/o_str.h"
#include <openssl/crypto.h>
#include "internal/cryptlib.h"
#include "internal/o_str.h"
@@
-27,14
+27,12
@@
int OPENSSL_memcmp(const void *v1, const void *v2, size_t n)
char *CRYPTO_strdup(const char *str, const char* file, int line)
{
char *ret;
char *CRYPTO_strdup(const char *str, const char* file, int line)
{
char *ret;
- size_t size;
if (str == NULL)
return NULL;
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)
if (ret != NULL)
-
memcpy(ret, str, size
);
+
strcpy(ret, str
);
return ret;
}
return ret;
}