Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 2016 14:39:39 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r296095 - head/lib/libc/rpc
Message-ID:  <201602261439.u1QEddr9095148@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Fri Feb 26 14:39:39 2016
New Revision: 296095
URL: https://svnweb.freebsd.org/changeset/base/296095

Log:
  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)
  MFC after:	1 month

Modified:
  head/lib/libc/rpc/svc_simple.c

Modified: head/lib/libc/rpc/svc_simple.c
==============================================================================
--- head/lib/libc/rpc/svc_simple.c	Fri Feb 26 14:04:00 2016	(r296094)
+++ head/lib/libc/rpc/svc_simple.c	Fri Feb 26 14:39:39 2016	(r296095)
@@ -272,7 +272,7 @@ universal(struct svc_req *rqstp, SVCXPRT
 			/* 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?201602261439.u1QEddr9095148>