summaryrefslogtreecommitdiffstats
path: root/abs/core/libtirpc/libtirpc-fix-segfault-0.2.2.patch
blob: 8a04c16de4706733738a580ec42ee09fb96bcd08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff -up libtirpc-0.2.2/src/svc_dg.c.orig libtirpc-0.2.2/src/svc_dg.c
--- libtirpc-0.2.2/src/svc_dg.c.orig	2011-07-19 15:02:41.087631000 -0400
+++ libtirpc-0.2.2/src/svc_dg.c	2011-07-19 15:04:43.154243000 -0400
@@ -254,8 +254,8 @@ svc_dg_reply(xprt, msg)
 	XDR_SETPOS(xdrs, 0);
 	msg->rm_xid = su->su_xid;
 	if (xdr_replymsg(xdrs, msg) &&
-	    (!has_args ||
-	     (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
+	    (!has_args || (xprt->xp_auth &&
+	     SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
 		struct msghdr *msg = &su->su_msghdr;
 		struct iovec iov;
 
diff -up libtirpc-0.2.2/src/svc_vc.c.orig libtirpc-0.2.2/src/svc_vc.c
--- libtirpc-0.2.2/src/svc_vc.c.orig	2011-07-19 15:05:28.577588000 -0400
+++ libtirpc-0.2.2/src/svc_vc.c	2011-07-19 15:05:40.058928000 -0400
@@ -698,8 +698,8 @@ svc_vc_reply(xprt, msg)
 	msg->rm_xid = cd->x_id;
 	rstat = FALSE;
 	if (xdr_replymsg(xdrs, msg) &&
-	    (!has_args ||
-	     (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
+	    (!has_args || (xprt->xp_auth &&
+	     SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
 		rstat = TRUE;
 	}
 	(void)xdrrec_endofrecord(xdrs, TRUE);