diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2007-09-25 11:20:35 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2007-09-25 11:20:35 +0000 |
commit | 379821d4ca338301b1ad7910948dbcdbd7713806 (patch) | |
tree | b7ae2fc8cb2f93190f107d0b30281f767b326c46 /usr.sbin/authpf | |
parent | 09944c345be5ccdda2b0574ccea1f177d2d91e49 (diff) |
handle empty strings returned by fgets
ok ray@
Diffstat (limited to 'usr.sbin/authpf')
-rw-r--r-- | usr.sbin/authpf/authpf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/authpf/authpf.c b/usr.sbin/authpf/authpf.c index 68adcd258ee..c60197594d0 100644 --- a/usr.sbin/authpf/authpf.c +++ b/usr.sbin/authpf/authpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authpf.c,v 1.104 2007/02/24 17:35:08 beck Exp $ */ +/* $OpenBSD: authpf.c,v 1.105 2007/09/25 11:20:34 chl Exp $ */ /* * Copyright (C) 1998 - 2007 Bob Beck (beck@openbsd.org). @@ -349,6 +349,8 @@ read_config(FILE *f) } i++; len = strlen(buf); + if (len == 0) + continue; if (buf[len - 1] != '\n' && !feof(f)) { syslog(LOG_ERR, "line %d too long in %s", i, PATH_CONFFILE); |