summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-03-27 19:42:42 +0000
committerpfg <pfg@FreeBSD.org>2016-03-27 19:42:42 +0000
commit67c76e9e66c4d4acb0809eb94a06cd5d2de317d9 (patch)
treee51ee4e172c2a94ef12e23017b8e4fb40a8ce4e3 /lib/libc/rpc
parentf433ddb387a306a9a83447c9d8a54550d2996d53 (diff)
downloadFreeBSD-src-67c76e9e66c4d4acb0809eb94a06cd5d2de317d9.zip
FreeBSD-src-67c76e9e66c4d4acb0809eb94a06cd5d2de317d9.tar.gz
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)
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r--lib/libc/rpc/svc_simple.c2
1 files changed, 1 insertions, 1 deletions
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
OpenPOWER on IntegriCloud