mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-07 04:39:26 -05:00
IOS/NetIPTopDevice: Zero-initialize sockaddr structs
Fixes https://github.com/dolphin-emu/dolphin/security/advisories/GHSA-5fqv-9qrg-gm4j
This commit is contained in:
parent
da1aad5188
commit
95ee7de40e
|
|
@ -730,7 +730,7 @@ IPCReply NetIPTopDevice::HandleGetSockNameRequest(const IOCtlRequest& request)
|
|||
|
||||
request.Log(GetDeviceName(), Common::Log::LogType::IOS_WC24);
|
||||
|
||||
sockaddr sa;
|
||||
sockaddr sa{};
|
||||
socklen_t sa_len = sizeof(sa);
|
||||
const int ret =
|
||||
getsockname(GetEmulationKernel().GetSocketManager()->GetHostSocket(fd), &sa, &sa_len);
|
||||
|
|
@ -758,7 +758,7 @@ IPCReply NetIPTopDevice::HandleGetPeerNameRequest(const IOCtlRequest& request)
|
|||
|
||||
u32 fd = memory.Read_U32(request.buffer_in);
|
||||
|
||||
sockaddr sa;
|
||||
sockaddr sa{};
|
||||
socklen_t sa_len = sizeof(sa);
|
||||
const int ret =
|
||||
getpeername(GetEmulationKernel().GetSocketManager()->GetHostSocket(fd), &sa, &sa_len);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user