diff options
author | 2014-01-13 20:56:24 +0000 | |
---|---|---|
committer | 2014-01-13 20:56:24 +0000 | |
commit | 8fdacab3041bfc9ede24797ea378d37686381aae (patch) | |
tree | 93552fab76437341b7248c332a9baf5ccc5029ed | |
parent | fix another chmod on permanent tempfile to respect umask. (diff) | |
download | wireguard-openbsd-8fdacab3041bfc9ede24797ea378d37686381aae.tar.xz wireguard-openbsd-8fdacab3041bfc9ede24797ea378d37686381aae.zip |
Don't eat two tokens when encountering a non-terminal '}'. Avoids
possibly ignoring entire rest of dhclient.conf or dhclient.leases.if
looking for a mistakenly consumed '}'.
-rw-r--r-- | sbin/dhclient/parse.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c index 387a355cd3f..31f49f8f160 100644 --- a/sbin/dhclient/parse.c +++ b/sbin/dhclient/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.29 2014/01/10 01:38:15 krw Exp $ */ +/* $OpenBSD: parse.c,v 1.30 2014/01/13 20:56:24 krw Exp $ */ /* Common parser code for dhcpd and dhclient. */ @@ -70,9 +70,10 @@ skip_to_semi(FILE *cfile) token = peek_token(NULL, cfile); if (token == '}') { if (brace_count) { - token = next_token(NULL, cfile); - if (!--brace_count) + if (!--brace_count) { + token = next_token(NULL, cfile); return; + } } else return; } else if (token == '{') { |