diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2005-05-24 20:10:51 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2005-05-24 20:10:51 +0000 |
commit | 02cea57cac2e4aaab9da1688775868e4ffb76090 (patch) | |
tree | 1a10c3603ec235f3369f4bb56bb2cb67eff06e7e | |
parent | 934c95e55ffc4be7af04f04335821a331760d0f1 (diff) |
ifa->ifa_addr can be NULL in some cases, pt out by Kurt Roeckx
<kurt@roeckx.be> / bugs.debian.org/310586
-rw-r--r-- | usr.sbin/ntpd/server.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/server.c b/usr.sbin/ntpd/server.c index 1e2d536d05f..27668c92406 100644 --- a/usr.sbin/ntpd/server.c +++ b/usr.sbin/ntpd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.21 2005/01/28 12:01:32 dtucker Exp $ */ +/* $OpenBSD: server.c,v 1.22 2005/05/24 20:10:50 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -44,8 +44,9 @@ setup_listeners(struct servent *se, struct ntpd_conf *conf, u_int *cnt) for (ifap = ifa; ifap != NULL; ifap = ifap->ifa_next) { sa = ifap->ifa_addr; - if (sa->sa_family != AF_INET && - sa->sa_family != AF_INET6) + if (sa == NULL || + (sa->sa_family != AF_INET && + sa->sa_family != AF_INET6)) continue; if ((la = calloc(1, sizeof(struct listen_addr))) == |