pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


Workaround for Win10/32bit crashes with referrals
Posted by Anonymous on Mon 28th Oct 2024 19:39
raw | new post

  1. diff --git a/libtirpc/src/xdr.c b/libtirpc/src/xdr.c
  2. index 46c1b34..add9b2e 100644
  3. --- a/libtirpc/src/xdr.c
  4. +++ b/libtirpc/src/xdr.c
  5. @@ -603,6 +603,25 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
  6.  
  7.         case XDR_FREE:
  8.                 if (sp != NULL) {
  9. +#if 1
  10. +                       /*
  11. +                        * gisburn: Hacked workaround for crashes with NFSv4
  12. +                        * referrals on Win10/32bit (64bit is not affected)
  13. +                        * Somehow we come from auth_none.c, and at XDR_FREE
  14. +                        * time we have a |(char *)0x1| pointer with
  15. +                        * |nodesize==0|
  16. +                        */
  17. +                       if (nodesize == 0) {
  18. +                               (void)fprintf(stderr,
  19. +                                       "xdr_bytes: "
  20. +                                       "XDR_FREE with nodesize==0, "
  21. +                                       "xdrs=0x%p, cpp=0x%p, sp=0x%p, "
  22. +                                       "maxsize=%ld\n",
  23. +                                       xdrs, cpp, sp, (long)maxsize);
  24. +                               *cpp = NULL;
  25. +                               return (TRUE);
  26. +                       }
  27. +#endif
  28.                         mem_free(sp, nodesize);
  29.                         *cpp = NULL;
  30.                 }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at