summaryrefslogtreecommitdiff
path: root/lib/sgetpwent.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sgetpwent.c')
-rw-r--r--lib/sgetpwent.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sgetpwent.c b/lib/sgetpwent.c
index 293aabe2..befdd916 100644
--- a/lib/sgetpwent.c
+++ b/lib/sgetpwent.c
@@ -90,6 +90,11 @@ struct passwd *sgetpwent (const char *buf)
}
}
+ /* something at the end, columns over shot */
+ if( cp != NULL ) {
+ return( NULL );
+ }
+
/*
* There must be exactly NFIELDS colon separated fields or
* the entry is invalid. Also, the UID and GID must be non-blank.