diff options
author | 2006-12-26 15:03:16 +0000 | |
---|---|---|
committer | 2006-12-26 15:03:16 +0000 | |
commit | 9c315a73e108961a4efa2a1146a038af8367dc2a (patch) | |
tree | dbcf625042cf9d7183cc11c547fdb3448dfc8503 | |
parent | Fix inline asm. From GCC PR 17856. Fixes gnash on amd64. (diff) | |
download | wireguard-openbsd-9c315a73e108961a4efa2a1146a038af8367dc2a.tar.xz wireguard-openbsd-9c315a73e108961a4efa2a1146a038af8367dc2a.zip |
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; |