Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Mar 2016 19:43:26 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r297320 - stable/9/lib/libc/rpc
Message-ID:  <201603271943.u2RJhQYj054158@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Sun Mar 27 19:43:26 2016
New Revision: 297320
URL: https://svnweb.freebsd.org/changeset/base/297320

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/9/lib/libc/rpc/svc_simple.c
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/rpc/svc_simple.c
==============================================================================
--- stable/9/lib/libc/rpc/svc_simple.c	Sun Mar 27 19:42:42 2016	(r297319)
+++ stable/9/lib/libc/rpc/svc_simple.c	Sun Mar 27 19:43:26 2016	(r297320)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603271943.u2RJhQYj054158>