Browse Source

Check SA_LEN(sa) after sa is checked for NULL. Pointed out by solar at

openwall.com, ok henning@
OPENBSD_3_9
dtucker 19 years ago
parent
commit
d71b0751da
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/usr.sbin/ntpd/server.c

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

@ -1,4 +1,4 @@
/* $OpenBSD: server.c,v 1.26 2005/09/24 00:32:03 dtucker Exp $ */
/* $OpenBSD: server.c,v 1.27 2006/01/19 06:40:16 dtucker Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -44,12 +44,12 @@ 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_LEN(sa) == 0)
continue;
if (sa == NULL ||
(sa->sa_family != AF_INET &&
sa->sa_family != AF_INET6))
continue;
if (SA_LEN(sa) == 0)
continue;
if ((la = calloc(1, sizeof(struct listen_addr))) ==
NULL)


Loading…
Cancel
Save