[*] Always check adapter info length

This commit is contained in:
Reece Wilson 2023-08-29 16:31:39 +01:00
parent 47cccd0490
commit 9fcc62fb92

View File

@ -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);