mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
[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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user