about summary refs log tree commit diff
path: root/nis/nis_subr.c
diff options
context:
space:
mode:
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;