mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
Avoid modifying any memory on SYS_NET_EINTR cases
This commit is contained in:
parent
56e27bdd49
commit
9b387485b5
@ -1424,13 +1424,13 @@ error_code sys_net_bnet_poll(ppu_thread& ppu, vm::ptr<sys_net_pollfd> fds, s32 n
|
||||
}
|
||||
}
|
||||
|
||||
std::memcpy(fds.get_ptr(), fds_buf.data(), nfds * sizeof(fds[0]));
|
||||
|
||||
if (!has_timedout && !signaled)
|
||||
{
|
||||
return -SYS_NET_EINTR;
|
||||
}
|
||||
|
||||
std::memcpy(fds.get_ptr(), fds_buf.data(), nfds * sizeof(fds[0]));
|
||||
|
||||
return not_an_error(signaled);
|
||||
}
|
||||
|
||||
@ -1664,6 +1664,11 @@ error_code sys_net_bnet_select(ppu_thread& ppu, s32 nfds, vm::ptr<sys_net_fd_set
|
||||
}
|
||||
}
|
||||
|
||||
if (!has_timedout && !signaled)
|
||||
{
|
||||
return -SYS_NET_EINTR;
|
||||
}
|
||||
|
||||
if (readfds)
|
||||
*readfds = rread;
|
||||
if (writefds)
|
||||
@ -1671,11 +1676,6 @@ error_code sys_net_bnet_select(ppu_thread& ppu, s32 nfds, vm::ptr<sys_net_fd_set
|
||||
if (exceptfds)
|
||||
*exceptfds = rexcept;
|
||||
|
||||
if (!has_timedout && !signaled)
|
||||
{
|
||||
return -SYS_NET_EINTR;
|
||||
}
|
||||
|
||||
return not_an_error(signaled);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user