From: Harlan Stenn Date: Sat, 9 Sep 2006 01:33:04 +0000 (-0400) Subject: [CID 6] Fix a possible null dereference X-Git-Tag: NTP_4_2_3P41~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=961f8c5604f2f478a9bd67e66f6927ab25783b63;p=thirdparty%2Fntp.git [CID 6] Fix a possible null dereference bk: 450219d0uxOL8Ps59kdW1cBWYNVl8A --- diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index 9e4d7b29f..0996e61dd 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -1908,12 +1908,12 @@ io_multicast_add( memset(&((struct sockaddr_in6*)&interface->mask)->sin6_addr.s6_addr, 0xff, sizeof(struct in6_addr)); #endif iface = findlocalcastinterface(&addr, INT_MULTICAST); -# ifdef ISC_PLATFORM_HAVESCOPEID if (iface) { +# ifdef ISC_PLATFORM_HAVESCOPEID lscope = ((struct sockaddr_in6*)&iface->sin)->sin6_scope_id; - } # endif - DPRINTF(4, ("Found interface #%d %s, scope: %d for address %s\n", iface->ifnum, iface->name, lscope, stoa(&addr))); + DPRINTF(4, ("Found interface #%d %s, scope: %d for address %s\n", iface->ifnum, iface->name, lscope, stoa(&addr))); + } break; }