From: Tom Yu Date: Mon, 10 Feb 1997 05:05:54 +0000 (+0000) Subject: * svc_udp.c (svcudp_recv): Avoid coredumps under Solaris (and X-Git-Tag: krb5-1.1-beta1~1357 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1299ac3c23cfab04eb6ebeb31f6839434634538e;p=krb5.git * 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 --- diff --git a/src/lib/rpc/ChangeLog b/src/lib/rpc/ChangeLog index 3d2245de6..6aea5fe9a 100644 --- a/src/lib/rpc/ChangeLog +++ b/src/lib/rpc/ChangeLog @@ -1,3 +1,9 @@ +Mon Feb 10 00:04:36 1997 Tom Yu + + * 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 * 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 142293fac..55b591092 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);