Merge pull request #206 from jimt/patch-1

fix Linux AF_INET iteration segfault
This commit is contained in:
LX3JL 2021-11-05 11:01:50 +01:00 committed by GitHub
commit 190021cc29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -790,7 +790,7 @@ bool CReflector::UpdateListenMac(void)
for ( ifaptr = ifap; (ifaptr != NULL) && !found; ifaptr = (ifaptr)->ifa_next )
{
// 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)
continue;