3da827
diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
3da827
index 0c34632..0f104a6 100644
3da827
--- a/src/rpcb_svc_com.c
3da827
+++ b/src/rpcb_svc_com.c
3da827
@@ -616,9 +616,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
3da827
 	struct netconfig *nconf;
3da827
 	struct netbuf *caller;
3da827
 	struct r_rmtcall_args a;
3da827
-	char *buf_alloc = NULL, *outbufp;
3da827
-	char *outbuf_alloc = NULL;
3da827
-	char buf[RPC_BUF_MAX], outbuf[RPC_BUF_MAX];
3da827
+	char  outbuf[RPC_BUF_MAX];
3da827
 	struct netbuf *na = (struct netbuf *) NULL;
3da827
 	struct rpc_msg call_msg;
3da827
 	int outlen;
3da827
@@ -639,36 +637,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
3da827
 	}
3da827
 	if (si.si_socktype != SOCK_DGRAM)
3da827
 		return;	/* Only datagram type accepted */
3da827
-	sendsz = __rpc_get_t_size(si.si_af, si.si_proto, UDPMSGSIZE);
3da827
-	if (sendsz == 0) {	/* data transfer not supported */
3da827
-		if (reply_type == RPCBPROC_INDIRECT)
3da827
-			svcerr_systemerr(transp);
3da827
-		return;
3da827
-	}
3da827
-	/*
3da827
-	 * Should be multiple of 4 for XDR.
3da827
-	 */
3da827
-	sendsz = ((sendsz + 3) / 4) * 4;
3da827
-	if (sendsz > RPC_BUF_MAX) {
3da827
-#ifdef	notyet
3da827
-		buf_alloc = alloca(sendsz);		/* not in IDR2? */
3da827
-#else
3da827
-		buf_alloc = malloc(sendsz);
3da827
-#endif	/* notyet */
3da827
-		if (buf_alloc == NULL) {
3da827
-			if (debugging)
3da827
-				xlog(LOG_DEBUG,
3da827
-					"rpcbproc_callit_com:  No Memory!\n");
3da827
-			if (reply_type == RPCBPROC_INDIRECT)
3da827
-				svcerr_systemerr(transp);
3da827
-			return;
3da827
-		}
3da827
-		a.rmt_args.args = buf_alloc;
3da827
-	} else {
3da827
-		a.rmt_args.args = buf;
3da827
-	}
3da827
+	sendsz = UDPMSGSIZE;
3da827
 
3da827
 	call_msg.rm_xid = 0;	/* For error checking purposes */
3da827
+	memset(&a, 0, sizeof(a)); /* Zero out the input buffer */
3da827
 	if (!svc_getargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) {
3da827
 		if (reply_type == RPCBPROC_INDIRECT)
3da827
 			svcerr_decode(transp);
3da827
@@ -704,11 +676,11 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
3da827
 
3da827
 	rpcbs_rmtcall(versnum - 2, reply_type, a.rmt_prog, a.rmt_vers,
3da827
 			a.rmt_proc, transp->xp_netid, rbl);
3da827
-
3da827
 	if (rbl == (rpcblist_ptr)NULL) {
3da827
 #ifdef RPCBIND_DEBUG
3da827
 		if (debugging)
3da827
-			xlog(LOG_DEBUG, "not found\n");
3da827
+			xlog(LOG_DEBUG, "prog %lu vers %lu: not found\n", 
3da827
+				a.rmt_prog, a.rmt_vers);
3da827
 #endif
3da827
 		if (reply_type == RPCBPROC_INDIRECT)
3da827
 			svcerr_noprog(transp);
3da827
@@ -822,24 +794,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
3da827
 	call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
3da827
 	call_msg.rm_call.cb_prog = a.rmt_prog;
3da827
 	call_msg.rm_call.cb_vers = a.rmt_vers;
3da827
-	if (sendsz > RPC_BUF_MAX) {
3da827
-#ifdef	notyet
3da827
-		outbuf_alloc = alloca(sendsz);	/* not in IDR2? */
3da827
-#else
3da827
-		outbuf_alloc = malloc(sendsz);
3da827
-#endif	/* notyet */
3da827
-		if (outbuf_alloc == NULL) {
3da827
-			if (reply_type == RPCBPROC_INDIRECT)
3da827
-				svcerr_systemerr(transp);
3da827
-			if (debugging)
3da827
-				xlog(LOG_DEBUG,
3da827
-				"rpcbproc_callit_com:  No memory!\n");
3da827
-			goto error;
3da827
-		}
3da827
-		xdrmem_create(&outxdr, outbuf_alloc, sendsz, XDR_ENCODE);
3da827
-	} else {
3da827
-		xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE);
3da827
-	}
3da827
+
3da827
+	memset(outbuf, '\0', sendsz); /* Zero out the output buffer */
3da827
+	xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE);
3da827
+
3da827
 	if (!xdr_callhdr(&outxdr, &call_msg)) {
3da827
 		if (reply_type == RPCBPROC_INDIRECT)
3da827
 			svcerr_systemerr(transp);
3da827
@@ -904,10 +862,6 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
3da827
 		goto error;
3da827
 	}
3da827
 	outlen = (int) XDR_GETPOS(&outxdr);
3da827
-	if (outbuf_alloc)
3da827
-		outbufp = outbuf_alloc;
3da827
-	else
3da827
-		outbufp = outbuf;
3da827
 
3da827
 	na = uaddr2taddr(nconf, local_uaddr);
3da827
 	if (!na) {
3da827
@@ -916,7 +870,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
3da827
 		goto error;
3da827
 	}
3da827
 
3da827
-	if (sendto(fd, outbufp, outlen, 0, (struct sockaddr *)na->buf, na->len)
3da827
+	if (sendto(fd, outbuf, outlen, 0, (struct sockaddr *)na->buf, na->len)
3da827
 	    != outlen) {
3da827
 		if (debugging)
3da827
 			xlog(LOG_DEBUG,
3da827
@@ -941,10 +895,6 @@ out:
3da827
 	}
3da827
 	if (local_uaddr)
3da827
 		free(local_uaddr);
3da827
-	if (buf_alloc)
3da827
-		free(buf_alloc);
3da827
-	if (outbuf_alloc)
3da827
-		free(outbuf_alloc);
3da827
 	if (na) {
3da827
 		free(na->buf);
3da827
 		free(na);