doc/share/security/patches/SA-02:34/rpc.patch
Bjoern A. Zeeb 3571e53040 Import FreeBSD Security Advisories and Errata Notices, as well as their
patches for easier mirroring, to eliminate a special copy, to make
www.freebsd.org/security a full copy of security.freebsd.org and be
eventually be the same.

For now files are just sitting there.   The symlinks are missing.

Discussed on:	www (repository location)
Discussed with:	simon (so)
2012-08-15 06:19:40 +00:00

34 lines
887 B
Diff

--- lib/libc/xdr/xdr_array.c:1.8 Fri Aug 27 19:02:55 1999
+++ lib/libc/xdr/xdr_array.c Wed Jul 31 10:11:59 2002
@@ -42,6 +42,7 @@
* arrays. See xdr.h for more info on the interface to xdr.
*/
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -73,11 +74,12 @@
register u_int nodesize;
/* like strings, arrays are really counted arrays */
- if (! xdr_u_int(xdrs, sizep)) {
+ if (!xdr_u_int(xdrs, sizep)) {
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;
@@ -145,7 +147,7 @@
elptr = basep;
for (i = 0; i < nelem; i++) {
- if (! (*xdr_elem)(xdrs, elptr, LASTUNSIGNED)) {
+ if (!(*xdr_elem)(xdrs, elptr, LASTUNSIGNED)) {
return(FALSE);
}
elptr += elemsize;