Initialize fromlen before calling recvfrom to avoid passing in random

stack garbage.

Obtained from:	NetBSD 1.13
This commit is contained in:
Warner Losh 2010-02-07 07:50:41 +00:00
parent 0086085a03
commit 200ad46cd3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=203604

View File

@ -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);