summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpcbind
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-02-07 07:50:41 +0000
committerimp <imp@FreeBSD.org>2010-02-07 07:50:41 +0000
commita1d856c6959effe1ac169ad8c3200fd99b30c719 (patch)
tree4489bde9e5c0df479bc93188f846e69a2a7c23ed /usr.sbin/rpcbind
parentfd70ced203e73547be675ab6e8cc5f8574f8ede5 (diff)
downloadFreeBSD-src-a1d856c6959effe1ac169ad8c3200fd99b30c719.zip
FreeBSD-src-a1d856c6959effe1ac169ad8c3200fd99b30c719.tar.gz
Initialize fromlen before calling recvfrom to avoid passing in random
stack garbage. Obtained from: NetBSD 1.13
Diffstat (limited to 'usr.sbin/rpcbind')
-rw-r--r--usr.sbin/rpcbind/rpcb_svc_com.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/rpcbind/rpcb_svc_com.c b/usr.sbin/rpcbind/rpcb_svc_com.c
index ab7c8ff..79cb937 100644
--- a/usr.sbin/rpcbind/rpcb_svc_com.c
+++ b/usr.sbin/rpcbind/rpcb_svc_com.c
@@ -1224,6 +1224,7 @@ handle_reply(int fd, SVCXPRT *xprt)
goto done;
do {
+ fromlen = sizeof(ss);
inlen = recvfrom(fd, buffer, RPC_BUF_MAX, 0,
(struct sockaddr *)&ss, &fromlen);
} while (inlen < 0 && errno == EINTR);
OpenPOWER on IntegriCloud