diff --git a/appl/login/limits_conf.c b/appl/login/limits_conf.c index 5bbcb5798..afa8539c4 100644 --- a/appl/login/limits_conf.c +++ b/appl/login/limits_conf.c @@ -120,6 +120,10 @@ read_limits_conf(const char *file, const struct passwd *pwd) lineno++; + if(buf[0] == '\0') { + syslog(LOG_ERR, "%s: line %d: NUL character", file, lineno); + continue; + } if(buf[strlen(buf) - 1] != '\n') { /* file did not end with a newline, figure out if we're at the EOF, or if our buffer was too small */