Author: pfg
Date: Sun Mar 27 19:42:42 2016
New Revision: 297319
URL: https://svnweb.freebsd.org/changeset/base/297319

Log:
  MFC r296095:
  rpc: fix failure to clear string by passing the wrong size to memset.
  
  Noted by NetBSD's PR/21014
  
  Obtained from:        NetBSD (CVS Rev. 1.24, 1.25)

Modified:
  stable/10/lib/libc/rpc/svc_simple.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/svc_simple.c
==============================================================================
--- stable/10/lib/libc/rpc/svc_simple.c Sun Mar 27 18:26:59 2016        
(r297318)
+++ stable/10/lib/libc/rpc/svc_simple.c Sun Mar 27 19:42:42 2016        
(r297319)
@@ -272,7 +272,7 @@ universal(rqstp, transp)
                        /* decode arguments into a CLEAN buffer */
                        xdrbuf = pl->p_xdrbuf;
                        /* Zero the arguments: reqd ! */
-                       (void) memset(xdrbuf, 0, sizeof (pl->p_recvsz));
+                       (void) memset(xdrbuf, 0, (size_t)pl->p_recvsz);
                        /*
                         * Assuming that sizeof (xdrbuf) would be enough
                         * for the arguments; if not then the program
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to