[*] Always check adapter info length
This commit is contained in:
parent
47cccd0490
commit
9fcc62fb92
@ -131,6 +131,11 @@ namespace Aurora::IO::Net
|
||||
|
||||
while (pCurrAddresses)
|
||||
{
|
||||
if (pCurrAddresses->Length != sizeof(T))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
auto pAdapter = AuMakeSharedThrow<NetAdapter>();
|
||||
auto &adapter = *pAdapter.get();
|
||||
adapter.device = pCurrAddresses->AdapterName;
|
||||
@ -271,7 +276,7 @@ namespace Aurora::IO::Net
|
||||
|
||||
static void PrecacheAdapters()
|
||||
{
|
||||
if (!AuSwInfo::IsWindowsVistaOrGreater())
|
||||
if (AuSwInfo::IsWindowsXPAny())
|
||||
{
|
||||
auto pAdaptersV4 = GetAddressesForFamilyXP(AF_INET);
|
||||
auto pAdaptersV6 = GetAddressesForFamilyXP(AF_INET6);
|
||||
|
Loading…
Reference in New Issue
Block a user