summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>1998-05-20 15:56:11 +0000
committerBill Paul <wpaul@FreeBSD.org>1998-05-20 15:56:11 +0000
commit1ce4aec2b412de2d5fbe5ee107cc7364d946f3f0 (patch)
treedecc759c35d4c39781305c5d5d4c18e382e363ec /lib/libc
parent6d5a01beb3ffd23b2a9dc948d7957b9cef54749a (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/xdr/xdr_rec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libc/xdr/xdr_rec.c b/lib/libc/xdr/xdr_rec.c
index 2919e289e67f..b94b1ab0142a 100644
--- a/lib/libc/xdr/xdr_rec.c
+++ b/lib/libc/xdr/xdr_rec.c
@@ -29,7 +29,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)xdr_rec.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: xdr_rec.c,v 1.8 1997/05/28 04:57:38 wpaul Exp $";
+static char *rcsid = "$Id: xdr_rec.c,v 1.9 1998/05/15 22:57:31 wpaul Exp $";
#endif
/*
@@ -552,9 +552,13 @@ set_input_fragment(rstrm)
rstrm->last_frag = ((header & LAST_FRAG) == 0) ? FALSE : TRUE;
/*
* Sanity check. Try not to accept wildly incorrect
- * record sizes.
+ * record sizes. Unfortunately, the only record size
+ * we can positively identify as being 'wildly incorrect'
+ * is zero. Ridiculously large record sizes may look wrong,
+ * but we don't have any way to be certain that they aren't
+ * what the client actually intended to send us.
*/
- if ((header & (~LAST_FRAG)) > rstrm->recvsize)
+ if ((header & (~LAST_FRAG)) == 0)
return(FALSE);
rstrm->fbtbc = header & (~LAST_FRAG);
return (TRUE);