PageRenderTime 15ms CodeModel.GetById 13ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/packages/network/libtirpc/patches/libtirpc-0.2.2-wrap-segfault.patch

http://github.com/OpenELEC/OpenELEC.tv
Patch | 28 lines | 27 code | 1 blank | 0 comment | 0 complexity | 5a3ab55934cad4e8b38fc90c54756472 MD5 | raw file
 1diff -up libtirpc-0.2.2/src/svc_dg.c.orig libtirpc-0.2.2/src/svc_dg.c
 2--- libtirpc-0.2.2/src/svc_dg.c.orig	2011-07-19 15:02:41.087631000 -0400
 3+++ libtirpc-0.2.2/src/svc_dg.c	2011-07-19 15:04:43.154243000 -0400
 4@@ -254,8 +254,8 @@ svc_dg_reply(xprt, msg)
 5 	XDR_SETPOS(xdrs, 0);
 6 	msg->rm_xid = su->su_xid;
 7 	if (xdr_replymsg(xdrs, msg) &&
 8-	    (!has_args ||
 9-	     (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
10+	    (!has_args || (xprt->xp_auth &&
11+	     SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
12 		struct msghdr *msg = &su->su_msghdr;
13 		struct iovec iov;
14 
15diff -up libtirpc-0.2.2/src/svc_vc.c.orig libtirpc-0.2.2/src/svc_vc.c
16--- libtirpc-0.2.2/src/svc_vc.c.orig	2011-07-19 15:05:28.577588000 -0400
17+++ libtirpc-0.2.2/src/svc_vc.c	2011-07-19 15:05:40.058928000 -0400
18@@ -698,8 +698,8 @@ svc_vc_reply(xprt, msg)
19 	msg->rm_xid = cd->x_id;
20 	rstat = FALSE;
21 	if (xdr_replymsg(xdrs, msg) &&
22-	    (!has_args ||
23-	     (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
24+	    (!has_args || (xprt->xp_auth &&
25+	     SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
26 		rstat = TRUE;
27 	}
28 	(void)xdrrec_endofrecord(xdrs, TRUE);