diff options
author | chl <chl@openbsd.org> | 2007-09-25 11:20:34 +0000 |
---|---|---|
committer | chl <chl@openbsd.org> | 2007-09-25 11:20:34 +0000 |
commit | 4b7b714f478e8dc9d9d92de8384bfb5eb7b6258b (patch) | |
tree | dc24afd2237a44e15f63e1ac9e22c7c14c0540f5 /usr.sbin/authpf | |
parent | missing header for strptime (diff) | |
download | wireguard-openbsd-4b7b714f478e8dc9d9d92de8384bfb5eb7b6258b.tar.xz wireguard-openbsd-4b7b714f478e8dc9d9d92de8384bfb5eb7b6258b.zip |
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); |