void-packages/srcpkgs/libtirpc/patches/libtirpc-fix-segfault-0.2.2.patch
2012-01-28 16:13:00 +01:00

28 lines
1.2 KiB
Diff

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);