diff options
author | 2005-05-24 20:10:50 +0000 | |
---|---|---|
committer | 2005-05-24 20:10:50 +0000 | |
commit | 71ae043c71abacb51daaa7dc18f6e8877396efac (patch) | |
tree | 1dbbbf10a95e87dcbba1740fa52540b22f6d4a76 | |
parent | .Cd and .Xr's for zaurus (diff) | |
download | wireguard-openbsd-71ae043c71abacb51daaa7dc18f6e8877396efac.tar.xz wireguard-openbsd-71ae043c71abacb51daaa7dc18f6e8877396efac.zip |
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))) == |