mirror of
https://github.com/devkitPro/wut.git
synced 2026-03-21 17:34:47 -05:00
Added safety check for poll(): the nsysnet fd must fit in nsysnet_fd_set.
This commit is contained in:
parent
055b968da7
commit
fa61982981
|
|
@ -32,6 +32,10 @@ poll(struct pollfd *fds,
|
|||
|
||||
if ((cnv_fd + 1) > cnv_nfds) {
|
||||
cnv_nfds = cnv_fd + 1;
|
||||
if (cnv_nfds > NSYSNET_FD_SETSIZE) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (fds[i].events & POLLIN) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user