summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2015-05-02 12:37:35 +0000
committerkrw <krw@openbsd.org>2015-05-02 12:37:35 +0000
commitbc61fb54ce8ff953504f5c109ad7cf0febb7276b (patch)
treef423e5606bb9df8277b23226aa49181d61c93036
parentrework hppa mutexes. (diff)
downloadwireguard-openbsd-bc61fb54ce8ff953504f5c109ad7cf0febb7276b.tar.xz
wireguard-openbsd-bc61fb54ce8ff953504f5c109ad7cf0febb7276b.zip
Correct switch between current and previous line buffers when
encountering a carriage return in the input. Found by jsg@ a long time ago in a respository far, far away.
-rw-r--r--sbin/dhclient/conflex.c6
-rw-r--r--usr.sbin/dhcpd/conflex.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/sbin/dhclient/conflex.c b/sbin/dhclient/conflex.c
index 46fb37e31d9..df77fb01ef6 100644
--- a/sbin/dhclient/conflex.c
+++ b/sbin/dhclient/conflex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conflex.c,v 1.29 2014/05/05 18:02:49 krw Exp $ */
+/* $OpenBSD: conflex.c,v 1.30 2015/05/02 12:37:35 krw Exp $ */
/* Lexical scanner for dhclient config file. */
@@ -107,8 +107,8 @@ get_char(FILE *cfile)
cur_line = line2;
prev_line = line1;
} else {
- cur_line = line2;
- prev_line = line1;
+ cur_line = line1;
+ prev_line = line2;
}
line++;
lpos = 1;
diff --git a/usr.sbin/dhcpd/conflex.c b/usr.sbin/dhcpd/conflex.c
index b3cf193cf23..ef41ae8c67e 100644
--- a/usr.sbin/dhcpd/conflex.c
+++ b/usr.sbin/dhcpd/conflex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conflex.c,v 1.12 2013/12/05 22:31:35 krw Exp $ */
+/* $OpenBSD: conflex.c,v 1.13 2015/05/02 12:37:35 krw Exp $ */
/* Lexical scanner for dhcpd config file... */
@@ -94,8 +94,8 @@ get_char(FILE *cfile)
cur_line = line2;
prev_line = line1;
} else {
- cur_line = line2;
- prev_line = line1;
+ cur_line = line1;
+ prev_line = line2;
}
line++;
lpos = 1;