diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs index eaf65e4cc..bc174cce5 100644 --- a/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs @@ -530,7 +530,14 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd receiveRegion.Dispose(); - context.Memory.Write(sockAddrOutPosition, BsdSockAddr.FromIPEndPoint(endPoint)); + if (sockAddrOutSize != 0 && sockAddrOutSize >= (ulong) Unsafe.SizeOf()) + { + context.Memory.Write(sockAddrOutPosition, BsdSockAddr.FromIPEndPoint(endPoint)); + } + else + { + errno = LinuxError.ENOMEM; + } } }