This commit is contained in:
AdamN
2025-01-11 09:24:39 +07:00
committed by GitHub
parent ec99cb47bd
commit c5e1ea71e0
+2 -2
View File
@@ -143,7 +143,7 @@ static int sceNetInetGetpeername(int socket, u32 namePtr, u32 namelenPtr) {
inetLastErrno = socket_errno;
return hleLogError(Log::sceNet, retval, "errno = %d", inetLastErrno);
} else {
// FIXME: We shouldn't use the returned len here, because the returned len is the actual size needed, which can be larger than the inputted len
// We shouldn't use the returned len here, because the returned len is the actual size needed, which can be larger than the inputted len
memcpy(name->sa_data, saddr.addr.sa_data, name->sa_len - (sizeof(name->sa_len) + sizeof(name->sa_family)));
name->sa_family = saddr.addr.sa_family;
}
@@ -177,7 +177,7 @@ static int sceNetInetGetsockname(int socket, u32 namePtr, u32 namelenPtr) {
inetLastErrno = socket_errno;
return hleLogError(Log::sceNet, retval, "errno = %d", inetLastErrno);
} else {
// FIXME: We shouldn't use the returned len here, because the returned len is the actual size needed, which can be larger than the inputted len
// We shouldn't use the returned len here, because the returned len is the actual size needed, which can be larger than the inputted len
memcpy(name->sa_data, saddr.addr.sa_data, name->sa_len - (sizeof(name->sa_len) + sizeof(name->sa_family)));
name->sa_family = saddr.addr.sa_family;
}