about summary refs log tree commit diff
path: root/sunrpc/xdr_rec.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-05-18 09:53:46 +0000
committerUlrich Drepper <drepper@redhat.com>1998-05-18 09:53:46 +0000
commit41aa20c243f5b9d51150586651e8b5437cfdb085 (patch)
tree65f6432d89feaf324a7eddbbbd451add8f0bfd37 /sunrpc/xdr_rec.c
parent92040cbc5f1a18a85735127c3677275c419674cb (diff)
downloadglibc-41aa20c243f5b9d51150586651e8b5437cfdb085.tar.gz
glibc-41aa20c243f5b9d51150586651e8b5437cfdb085.tar.xz
glibc-41aa20c243f5b9d51150586651e8b5437cfdb085.zip
Update.
1998-05-18  Ulrich Drepper  <drepper@cygnus.com>

	* iconvdata/TESTS: ISO-2022-KR has not really ASCII as a subset
	(the designation sequence is disturbing).
Diffstat (limited to 'sunrpc/xdr_rec.c')
-rw-r--r--sunrpc/xdr_rec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c
index db5684bcab..f855b3d90e 100644
--- a/sunrpc/xdr_rec.c
+++ b/sunrpc/xdr_rec.c
@@ -567,6 +567,12 @@ set_input_fragment (RECSTREAM *rstrm)
     return FALSE;
   header = ntohl (header);
   rstrm->last_frag = ((header & LAST_FRAG) == 0) ? FALSE : TRUE;
+  /*
+   * Sanity check. Try not to accept wildly incorrect
+   * record sizes.
+   */
+  if ((header & (~LAST_FRAG)) > rstrm->recvsize)
+    return(FALSE);
   rstrm->fbtbc = header & ~LAST_FRAG;
   return TRUE;
 }