diff options
author | Moritz Jodeit <moritz@cvs.openbsd.org> | 2006-12-26 15:03:17 +0000 |
---|---|---|
committer | Moritz Jodeit <moritz@cvs.openbsd.org> | 2006-12-26 15:03:17 +0000 |
commit | aaf01e9fc7d9bc5cdc0fcada54c185ed33741416 (patch) | |
tree | df742a0399bdcc232dfcead78d1b6bdeb7b951f2 | |
parent | 3b307d187bfe0a9c3b2c861c234227cb5d2aef53 (diff) |
There must be no alias address set, so check ifi->client->alias
for NULL before dereferencing it. OK henning@ krw@ deraadt@
-rw-r--r-- | sbin/dhclient/dhclient.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 53f38a8b74d..c09341f3d6f 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.93 2006/12/18 18:08:12 stevesk Exp $ */ +/* $OpenBSD: dhclient.c,v 1.94 2006/12/26 15:03:16 moritz Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -192,7 +192,8 @@ routehandler(struct protocol *p) if (addr_eq(a, l->address)) break; - if (l != NULL || addr_eq(a, ifi->client->alias->address)) + if (l != NULL || (ifi->client->alias && + addr_eq(a, ifi->client->alias->address))) /* new addr is the one we set */ break; |