summaryrefslogtreecommitdiffstats
path: root/lib/libc/xdr
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2000-01-19 06:12:32 +0000
committerwpaul <wpaul@FreeBSD.org>2000-01-19 06:12:32 +0000
commit81ac67ad74e0879cc0eb86f9abc74aca905c027b (patch)
tree53af1408d29604ab59488e5f13b92ff4a79efeaf /lib/libc/xdr
parentf2d8638a5cd5ac52f1895ef7a64fa71cf2786e57 (diff)
downloadFreeBSD-src-81ac67ad74e0879cc0eb86f9abc74aca905c027b.zip
FreeBSD-src-81ac67ad74e0879cc0eb86f9abc74aca905c027b.tar.gz
Close PR#16028. Make the sanity check saner. The condition that we
check for on the server may arise legitimately on the client. The correct way to check for a zero record length is to check for it without the LAST_FRAG marker in it, since it's legal to send a LAST_FRAG marker with 0 bytes of data. PR: misc/16028
Diffstat (limited to 'lib/libc/xdr')
-rw-r--r--lib/libc/xdr/xdr_rec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/xdr/xdr_rec.c b/lib/libc/xdr/xdr_rec.c
index b96b634..7136463 100644
--- a/lib/libc/xdr/xdr_rec.c
+++ b/lib/libc/xdr/xdr_rec.c
@@ -558,7 +558,7 @@ set_input_fragment(rstrm)
* 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)) == 0)
+ if (header == 0)
return(FALSE);
rstrm->fbtbc = header & (~LAST_FRAG);
return (TRUE);
OpenPOWER on IntegriCloud