PR/21014: Tom Lyon: Failure to clear string by passing the wrong size to memset

This commit is contained in:
christos 2003-04-05 03:47:18 +00:00
parent 64b72cb09f
commit cf3a405a52

View File

@ -1,4 +1,4 @@
/* $NetBSD: svc_simple.c,v 1.23 2003/01/18 11:29:07 thorpej Exp $ */
/* $NetBSD: svc_simple.c,v 1.24 2003/04/05 03:47:18 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -277,7 +277,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, pl->p_recvsz);
/*
* Assuming that sizeof (xdrbuf) would be enough
* for the arguments; if not then the program