summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>2000-01-28 20:02:02 +0000
committershin <shin@FreeBSD.org>2000-01-28 20:02:02 +0000
commit3f107b49a959e8eb9670e753fa3e82ec287d2901 (patch)
treecc2600eafe958ee35479e48c8a9e358413a77ed9 /libexec
parent3322d89b340a31be802230a7be196292eb9a2094 (diff)
downloadFreeBSD-src-3f107b49a959e8eb9670e753fa3e82ec287d2901.zip
FreeBSD-src-3f107b49a959e8eb9670e753fa3e82ec287d2901.tar.gz
Fix rshd coredump when AF_INET socket is used.
Confirmed by: F. Heinrichmeyer <fritz.heinrichmeyer@fernuni-hagen.de>
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rshd/rshd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c
index 54fa4a6..e5e07a4 100644
--- a/libexec/rshd/rshd.c
+++ b/libexec/rshd/rshd.c
@@ -320,7 +320,7 @@ doit(fromp)
exit(1);
}
fromp->su_port = htons(port);
- if (connect(s, (struct sockaddr *)fromp, sizeof (*fromp)) < 0) {
+ if (connect(s, (struct sockaddr *)fromp, fromp->su_len) < 0) {
syslog(LOG_INFO, "connect second port %d: %m", port);
exit(1);
}
OpenPOWER on IntegriCloud