about summary refs log tree commit diff
path: root/nss/nss_files
diff options
context:
space:
mode:
Diffstat (limited to 'nss/nss_files')
-rw-r--r--nss/nss_files/files-netgrp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nss/nss_files/files-netgrp.c b/nss/nss_files/files-netgrp.c
index c653825c78..427c6bfe8d 100644
--- a/nss/nss_files/files-netgrp.c
+++ b/nss/nss_files/files-netgrp.c
@@ -188,6 +188,11 @@ _nss_netgroup_parseline (char **cursor, struct __netgrent *result,
   const char *host, *user, *domain;
   char *cp = *cursor;
 
+  /* Some sanity checks.  */
+  if (cp == NULL)
+    /* User bug.  setnetgrent() wasn't called before.  */
+    abort ();
+
   /* First skip leading spaces.  */
   while (isspace (*cp))
     ++cp;