summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-02-26 14:39:39 +0000
committerpfg <pfg@FreeBSD.org>2016-02-26 14:39:39 +0000
commit99edb47f05ad02c131a5a8a8e42f3c8afa9bb3a5 (patch)
treed2bf7873dd7734858e49652846b639cf90b5b1cd /lib/libc
parent5f4b8a7cdb59bbaf66dabe2dfb25d059923fa4cc (diff)
downloadFreeBSD-src-99edb47f05ad02c131a5a8a8e42f3c8afa9bb3a5.zip
FreeBSD-src-99edb47f05ad02c131a5a8a8e42f3c8afa9bb3a5.tar.gz
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
Diffstat (limited to 'lib/libc')
-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 9ce3f8d..1c60950 100644
--- a/lib/libc/rpc/svc_simple.c
+++ b/lib/libc/rpc/svc_simple.c
@@ -272,7 +272,7 @@ universal(struct svc_req *rqstp, SVCXPRT *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