mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Fix: segfault in NetPlayServer::GetInterfaceListInternal for ifa_addr-less interfaces
`NetPlayServer::GetInterfaceListInternal` was crashing dolphin with a segfault when encountering a network interface without `ifa_addr`.
This commit is contained in:
parent
08c9e3b7a4
commit
b92a80ba1b
@ -828,6 +828,9 @@ std::vector<std::pair<std::string, std::string>> NetPlayServer::GetInterfaceList
|
||||
for (ifaddrs* curifp = ifp; curifp; curifp = curifp->ifa_next)
|
||||
{
|
||||
sockaddr* sa = curifp->ifa_addr;
|
||||
|
||||
if (sa == nullptr)
|
||||
continue;
|
||||
if (sa->sa_family != AF_INET)
|
||||
continue;
|
||||
sockaddr_in* sai = (struct sockaddr_in*) sa;
|
||||
|
Loading…
x
Reference in New Issue
Block a user