From 67c76e9e66c4d4acb0809eb94a06cd5d2de317d9 Mon Sep 17 00:00:00 2001
From: pfg <pfg@FreeBSD.org>
Date: Sun, 27 Mar 2016 19:42:42 +0000
Subject: 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)
---
 lib/libc/rpc/svc_simple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'lib/libc')

diff --git a/lib/libc/rpc/svc_simple.c b/lib/libc/rpc/svc_simple.c
index 942d07e..2e98c6a 100644
--- a/lib/libc/rpc/svc_simple.c
+++ b/lib/libc/rpc/svc_simple.c
@@ -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
-- 
cgit v1.1