mirror of
https://github.com/moonlight-stream/Internet-Hosting-Tool.git
synced 2026-04-23 00:17:33 +00:00
Fix uninitialized memory usage when UPNP_GetValidIGD() returns 3
This commit is contained in:
@@ -269,6 +269,10 @@ bool UPnPHandleDeviceList(struct UPNPDev* list, bool ipv6, bool enable)
|
||||
printf("No UPnP device found!" NL);
|
||||
return false;
|
||||
}
|
||||
else if (ret == 3) {
|
||||
printf("No UPnP IGD found!" NL);
|
||||
goto Exit;
|
||||
}
|
||||
else if (ret == 1) {
|
||||
printf("Found a connected UPnP IGD" NL);
|
||||
}
|
||||
@@ -278,12 +282,6 @@ bool UPnPHandleDeviceList(struct UPNPDev* list, bool ipv6, bool enable)
|
||||
// Even if we are able to add forwarding entries, go ahead and try NAT-PMP
|
||||
success = false;
|
||||
}
|
||||
else if (ret == 3) {
|
||||
printf("Found UPnP devices (assuming it's an IGD) (!)" NL);
|
||||
|
||||
// Even if we are able to add forwarding entries, go ahead and try NAT-PMP
|
||||
success = false;
|
||||
}
|
||||
else {
|
||||
printf("UPNP_GetValidIGD() failed: %d" NL, ret);
|
||||
goto Exit;
|
||||
|
||||
Reference in New Issue
Block a user