Browse Source

ifa->ifa_addr can be NULL in some cases, pt out by Kurt Roeckx

<kurt@roeckx.be> / bugs.debian.org/310586
OPENBSD_3_8
henning 19 years ago
parent
commit
e7bcb5fe62
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/usr.sbin/ntpd/server.c

+ 4
- 3
src/usr.sbin/ntpd/server.c View File

@ -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))) ==


Loading…
Cancel
Save