diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2017-07-26 18:16:22 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2017-07-26 18:16:22 +0000 |
commit | 06985a9763a8806457a1ea498f85fb6e15a262a5 (patch) | |
tree | b663f57a185d7eff2ed1d1390e16e2c615a5533e /sbin | |
parent | 3827cc754fa3ecd7e0ea5d73db37833cd54c7d56 (diff) |
Check the option length, not its address (which will never be NULL)
Spotted by clang, ok krw@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhclient/dhclient.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index e4403c0b2d7..bbc7bf583c8 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.485 2017/07/26 16:53:22 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.486 2017/07/26 18:16:21 jca Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -1878,7 +1878,7 @@ lease_as_proposal(struct client_lease *lease) } else log_warnx("DOMAIN_NAME too long"); } - if (&lease->options[DHO_DOMAIN_NAME_SERVERS].len != 0) { + if (lease->options[DHO_DOMAIN_NAME_SERVERS].len != 0) { int servers; opt = &lease->options[DHO_DOMAIN_NAME_SERVERS]; servers = opt->len / sizeof(struct in_addr); |