Merge pull request #206 from jimt/patch-1

fix Linux AF_INET iteration segfault
pull/209/head
LX3JL 4 years ago committed by GitHub
commit 190021cc29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -790,7 +790,7 @@ bool CReflector::UpdateListenMac(void)
for ( ifaptr = ifap; (ifaptr != NULL) && !found; ifaptr = (ifaptr)->ifa_next ) for ( ifaptr = ifap; (ifaptr != NULL) && !found; ifaptr = (ifaptr)->ifa_next )
{ {
// is it an AF_INET? // is it an AF_INET?
if ( ifaptr->ifa_addr->sa_family == AF_INET ) if ( ifaptr->ifa_addr && ifaptr->ifa_addr->sa_family == AF_INET )
{ {
if (ifaptr->ifa_addr == NULL) if (ifaptr->ifa_addr == NULL)
continue; continue;

Loading…
Cancel
Save

Powered by TurnKey Linux.