diff options
Diffstat (limited to 'usr.sbin/ppp/systems.c')
-rw-r--r-- | usr.sbin/ppp/systems.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c index b12a46c..935e871 100644 --- a/usr.sbin/ppp/systems.c +++ b/usr.sbin/ppp/systems.c @@ -320,9 +320,16 @@ ReadSystem(struct bundle *bundle, const char *name, const char *file, break; default: - if ((wp = findblank(cp, 0)) != NULL && *wp == '#') { - *wp = '\0'; - cp = strip(cp); + if ((wp = findblank(cp, 0)) != NULL) { + while (issep(*wp)) + *wp++ = '\0'; + if (*wp == '#') + *wp = '\0'; + if (*wp != '\0') { + log_Printf(LogWARN, "Bad label in %s (line %d) - too many words.\n", + filename, linenum); + continue; + } } wp = strchr(cp, ':'); if (wp == NULL || wp[1] != '\0') { |