summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient/clparse.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2015-05-18 17:51:21 +0000
committerkrw <krw@openbsd.org>2015-05-18 17:51:21 +0000
commit11b1f78ac67154562cb30cbdd164ae54e7e66fd6 (patch)
tree0498081d6fe2d220f89528fad255700ea047c510 /sbin/dhclient/clparse.c
parentFix a crash reported and analyzed by Bertrand PROVOST. When a HTTP (diff)
downloadwireguard-openbsd-11b1f78ac67154562cb30cbdd164ae54e7e66fd6.tar.xz
wireguard-openbsd-11b1f78ac67154562cb30cbdd164ae54e7e66fd6.zip
Tweak parsing so that hostnames starting with 0-9 are accepted.
Reported long ago by matthieu@. Also Jacob Berkman via the lists. Tests and suggestions from Jacob and Matthieu.
Diffstat (limited to 'sbin/dhclient/clparse.c')
-rw-r--r--sbin/dhclient/clparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c
index f0bd69ac23e..ae33a75970f 100644
--- a/sbin/dhclient/clparse.c
+++ b/sbin/dhclient/clparse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clparse.c,v 1.91 2015/02/01 18:43:39 krw Exp $ */
+/* $OpenBSD: clparse.c,v 1.92 2015/05/18 17:51:21 krw Exp $ */
/* Parser for dhclient config and lease files. */
@@ -286,7 +286,7 @@ parse_X(FILE *cfile, u_int8_t *buf, int max)
int len;
token = peek_token(&val, cfile);
- if (token == TOK_NUMBER_OR_NAME || token == TOK_NUMBER) {
+ if (token == TOK_NUMBER_OR_NAME) {
len = 0;
for (token = ':'; token == ':';
token = next_token(NULL, cfile)) {