mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
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
This commit is contained in:
parent
14232d424d
commit
a6221f7b51
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296095
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user