summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2000-05-17 16:57:03 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2000-05-17 16:57:03 +0000
commitd892bc2c54573acb6479a9abc23d4ceddbbc07ae (patch)
tree6c0c68bf891a20be015bc03bdc3211a90e310ee8
parent3cad145067f7746edaa9cd0cc554f2750fad0671 (diff)
copy only ai_addrlen bytes; misiek@pld.org.pl
-rw-r--r--usr.bin/ssh/sshconnect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c
index 4325eae747b..2e54651ea9b 100644
--- a/usr.bin/ssh/sshconnect.c
+++ b/usr.bin/ssh/sshconnect.c
@@ -8,7 +8,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect.c,v 1.73 2000/05/17 08:20:15 markus Exp $");
+RCSID("$OpenBSD: sshconnect.c,v 1.74 2000/05/17 16:57:02 markus Exp $");
#include <openssl/bn.h>
#include <openssl/dsa.h>
@@ -251,7 +251,7 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
temporarily_use_uid(original_real_uid);
if (connect(sock, ai->ai_addr, ai->ai_addrlen) >= 0) {
/* Successful connection. */
- memcpy(hostaddr, ai->ai_addr, sizeof(*hostaddr));
+ memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen);
restore_uid();
break;
} else {