summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libssl/src/apps/s_socket.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/src/apps/s_socket.c b/src/lib/libssl/src/apps/s_socket.c
index 57015ed8ff..d52714c8c7 100644
--- a/src/lib/libssl/src/apps/s_socket.c
+++ b/src/lib/libssl/src/apps/s_socket.c
@@ -302,11 +302,10 @@ redoit:
302 *host = NULL; 302 *host = NULL;
303 /* return(0); */ 303 /* return(0); */
304 } else { 304 } else {
305 if ((*host = (char *) malloc(strlen(h1->h_name) + 1)) == NULL) { 305 if ((*host = strdup(h1->h_name) == NULL) {
306 perror("malloc"); 306 perror("strdup");
307 return (0); 307 return (0);
308 } 308 }
309 strlcpy(*host, h1->h_name, strlen(h1->h_name) + 1);
310 309
311 h2 = GetHostByName(*host); 310 h2 = GetHostByName(*host);
312 if (h2 == NULL) { 311 if (h2 == NULL) {