From: Apple Date: Tue, 6 Aug 2002 19:46:15 +0000 (+0000) Subject: Libinfo-129.1.tar.gz X-Git-Tag: mac-os-x-1021^0 X-Git-Url: https://git.saurik.com/apple/libinfo.git/commitdiff_plain/c53a9fa49e29814372edc1e11de78c2e747f7fbf Libinfo-129.1.tar.gz --- diff --git a/rpc.subproj/xdr_array.c b/rpc.subproj/xdr_array.c index 7d68474..95f1d0a 100644 --- a/rpc.subproj/xdr_array.c +++ b/rpc.subproj/xdr_array.c @@ -53,7 +53,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";*/ /*static char *sccsid = "from: @(#)xdr_array.c 2.1 88/07/29 4.0 RPCSRC";*/ -static char *rcsid = "$Id: xdr_array.c,v 1.3 2002/02/19 20:36:26 epeyton Exp $"; +static char *rcsid = "$Id: xdr_array.c,v 1.3.84.1 2002/08/06 19:46:15 bbraun Exp $"; #endif /* @@ -70,6 +70,7 @@ static char *rcsid = "$Id: xdr_array.c,v 1.3 2002/02/19 20:36:26 epeyton Exp $"; #include #include #include +#include #define LASTUNSIGNED ((u_int)0-1) @@ -101,7 +102,8 @@ xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc) return (FALSE); } c = *sizep; - if ((c > maxsize) && (xdrs->x_op != XDR_FREE)) { + if ((c > maxsize || UINT_MAX/elsize < c) && + (xdrs->x_op != XDR_FREE)) { return (FALSE); } nodesize = c * elsize;