about summary refs log tree commit diff
path: root/nis/nis_subr.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-08-16 16:05:37 +0000
committerUlrich Drepper <drepper@redhat.com>2005-08-16 16:05:37 +0000
commitb4f6f4be85d32b9c03361c38376e36f08100e3e8 (patch)
treef785fc1acefcaa7026ee3e6a3d31f5b8ec5bdf2f /nis/nis_subr.c
parent908c9e87c3b639c8d1660a5c1a22c962634c6332 (diff)
downloadglibc-b4f6f4be85d32b9c03361c38376e36f08100e3e8.tar.gz
glibc-b4f6f4be85d32b9c03361c38376e36f08100e3e8.tar.xz
glibc-b4f6f4be85d32b9c03361c38376e36f08100e3e8.zip
[BZ #1188]
2005-08-10  Sergio Gelato  <Sergio.Gelato@astro.su.se>
	[BZ #1188]
	* nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Change assert check
	from (len > 0) to (len >= 0).

2005-08-16  Ulrich Drepper  <drepper@redhat.com>

	* nis/nis_xdr.c (_xdr_nis_result): Fix type of res variable.
	Reported by Thomas Schwinge.

2005-08-15  Jakub Jelinek  <jakub@redhat.com>

	* nis/nis_subr.c (nis_leaf_of_r): Handle buflen == 0 correctly.

2005-08-16  Ulrich Drepper  <drepper@redhat.com>

	* nss/getent.c (more_help): Use open_memstream instead of handling
	memory allocation ourselves.

2005-08-16  Jay Fenlason  <fenlason@redhat.com>

	* nss/getent.c (parse_options): change the -s option to support
	{database}:{search} to override /etc/resolv.conf for only the
	specified database.
Diffstat (limited to 'nis/nis_subr.c')
-rw-r--r--nis/nis_subr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nis/nis_subr.c b/nis/nis_subr.c
index 5838e30e88..7e29168111 100644
--- a/nis/nis_subr.c
+++ b/nis/nis_subr.c
@@ -39,7 +39,7 @@ nis_leaf_of_r (const_nis_name name, char *buffer, size_t buflen)
   while (name[i] != '.' && name[i] != '\0')
     i++;
 
-  if (__builtin_expect (i > buflen - 1, 0))
+  if (__builtin_expect (i >= buflen, 0))
     {
       __set_errno (ERANGE);
       return NULL;