diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-05-20 23:50:03 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-05-20 23:50:03 +0000 |
commit | 9dc44b00f3f41d240a05f12a04f2826939b01f34 (patch) | |
tree | 3087ffb70ee081cfcd1f95990740ad21d2ab3a1a /lib/libc/rpc | |
parent | acde91795b59865d645f6b4fd3d40f2c1123ef92 (diff) |
fragment size of 0 is clearly illegal; wpaul
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r-- | lib/libc/rpc/xdr_rec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/rpc/xdr_rec.c b/lib/libc/rpc/xdr_rec.c index 634094f2a98..68ff3622cbe 100644 --- a/lib/libc/rpc/xdr_rec.c +++ b/lib/libc/rpc/xdr_rec.c @@ -27,7 +27,7 @@ * Mountain View, California 94043 */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: xdr_rec.c,v 1.5 1997/05/28 21:28:56 deraadt Exp $"; +static char *rcsid = "$OpenBSD: xdr_rec.c,v 1.6 1998/05/20 23:50:02 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -548,6 +548,8 @@ set_input_fragment(rstrm) return (FALSE); header = (long)ntohl(header); rstrm->last_frag = ((header & LAST_FRAG) == 0) ? FALSE : TRUE; + if ((header & (~LAST_FRAG)) == 0) + return(FALSE); rstrm->fbtbc = header & (~LAST_FRAG); return (TRUE); } |