/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

  1. diff -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. diff -up libtirpc-0.2.2/src/svc_vc.c.orig libtirpc-0.2.2/src/svc_vc.c
  15. --- libtirpc-0.2.2/src/svc_vc.c.orig 2011-07-19 15:05:28.577588000 -0400
  16. +++ libtirpc-0.2.2/src/svc_vc.c 2011-07-19 15:05:40.058928000 -0400
  17. @@ -698,8 +698,8 @@ svc_vc_reply(xprt, msg)
  18. msg->rm_xid = cd->x_id;
  19. rstat = FALSE;
  20. if (xdr_replymsg(xdrs, msg) &&
  21. - (!has_args ||
  22. - (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
  23. + (!has_args || (xprt->xp_auth &&
  24. + SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
  25. rstat = TRUE;
  26. }
  27. (void)xdrrec_endofrecord(xdrs, TRUE);