about summary refs log tree commit diff
path: root/nss
diff options
context:
space:
mode:
Diffstat (limited to 'nss')
-rw-r--r--nss/nss_files/files-netgrp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nss/nss_files/files-netgrp.c b/nss/nss_files/files-netgrp.c
index 339f704c93..34eae4c5be 100644
--- a/nss/nss_files/files-netgrp.c
+++ b/nss/nss_files/files-netgrp.c
@@ -103,7 +103,8 @@ _nss_files_setnetgrent (const char *group, struct __netgrent *result)
 	      result->cursor += (curlen - group_len) - 1;
 	    }
 
-	  while (line[curlen - 1] == '\n' && line[curlen - 2] == '\\')
+	  while (curlen > 1 && line[curlen - 1] == '\n'
+		 && line[curlen - 2] == '\\')
 	    {
 	      /* Yes, we have a continuation line.  */
 	      if (found)