diff options
author | Tom Yu <tlyu@mit.edu> | 1997-02-10 05:05:54 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 1997-02-10 05:05:54 +0000 |
commit | 1299ac3c23cfab04eb6ebeb31f6839434634538e (patch) | |
tree | d543e02c7664c8251babc0141450da80a0b5236d | |
parent | 7940c41ca7eddb7bb6c776ad7da4596f0565dcbb (diff) | |
download | krb5-1299ac3c23cfab04eb6ebeb31f6839434634538e.tar.gz krb5-1299ac3c23cfab04eb6ebeb31f6839434634538e.tar.xz krb5-1299ac3c23cfab04eb6ebeb31f6839434634538e.zip |
* svc_udp.c (svcudp_recv): Avoid coredumps under Solaris (and
possibly other systems) by passing in a non-NULL iovec to
recvmsg().
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9834 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/rpc/ChangeLog | 6 | ||||
-rw-r--r-- | src/lib/rpc/svc_udp.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/rpc/ChangeLog b/src/lib/rpc/ChangeLog index 3d2245de6b..6aea5fe9ad 100644 --- a/src/lib/rpc/ChangeLog +++ b/src/lib/rpc/ChangeLog @@ -1,3 +1,9 @@ +Mon Feb 10 00:04:36 1997 Tom Yu <tlyu@mit.edu> + + * svc_udp.c (svcudp_recv): Avoid coredumps under Solaris (and + possibly other systems) by passing in a non-NULL iovec to + recvmsg(). + Thu Jan 16 19:02:22 1997 Tom Yu <tlyu@mit.edu> * Makefile.in (all-prerecurse): Update to use double-colon rules. diff --git a/src/lib/rpc/svc_udp.c b/src/lib/rpc/svc_udp.c index 142293facd..55b591092c 100644 --- a/src/lib/rpc/svc_udp.c +++ b/src/lib/rpc/svc_udp.c @@ -175,6 +175,7 @@ svcudp_recv(xprt, msg) struct rpc_msg *msg; { struct msghdr dummy; + struct iovec dummy_iov[1]; register struct svcudp_data *su = su_data(xprt); register XDR *xdrs = &(su->su_xdrs); register int rlen; @@ -183,6 +184,10 @@ svcudp_recv(xprt, msg) again: memset((char *) &dummy, 0, sizeof(dummy)); + dummy_iov[0].iov_base = rpc_buffer(xprt); + dummy_iov[0].iov_len = (int) su->su_iosz; + dummy.msg_iov = dummy_iov; + dummy.msg_iovlen = 1; dummy.msg_namelen = xprt->xp_laddrlen = sizeof(struct sockaddr_in); dummy.msg_name = (char *) &xprt->xp_laddr; rlen = recvmsg(xprt->xp_sock, &dummy, MSG_PEEK); |