projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace malloc+strcpy with strdup
[openssl.git]
/
crypto
/
dso
/
dso_win32.c
diff --git
a/crypto/dso/dso_win32.c
b/crypto/dso/dso_win32.c
index 635974be7017f9e18752b25d159d16b24b8c0b26..5f50774bb899be2ff6fe3f62478e46c2e8026f12 100644
(file)
--- a/
crypto/dso/dso_win32.c
+++ b/
crypto/dso/dso_win32.c
@@
-398,19
+398,17
@@
static char *win32_merger(DSO *dso, const char *filespec1,
return (NULL);
}
if (!filespec2) {
return (NULL);
}
if (!filespec2) {
- merged = OPENSSL_
malloc(strlen(filespec1) +
1);
+ merged = OPENSSL_
strdup(filespec
1);
if (merged == NULL) {
DSOerr(DSO_F_WIN32_MERGER, ERR_R_MALLOC_FAILURE);
return (NULL);
}
if (merged == NULL) {
DSOerr(DSO_F_WIN32_MERGER, ERR_R_MALLOC_FAILURE);
return (NULL);
}
- strcpy(merged, filespec1);
} else if (!filespec1) {
} else if (!filespec1) {
- merged = OPENSSL_
malloc(strlen(filespec2) + 1
);
+ merged = OPENSSL_
strdup(filespec2
);
if (merged == NULL) {
DSOerr(DSO_F_WIN32_MERGER, ERR_R_MALLOC_FAILURE);
return (NULL);
}
if (merged == NULL) {
DSOerr(DSO_F_WIN32_MERGER, ERR_R_MALLOC_FAILURE);
return (NULL);
}
- strcpy(merged, filespec2);
} else {
filespec1_split = win32_splitter(dso, filespec1, 0);
if (!filespec1_split) {
} else {
filespec1_split = win32_splitter(dso, filespec1, 0);
if (!filespec1_split) {