projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1063240
)
[socket] Fix bad parameter passed to select (#4390)
author
Ludovic Henry
<ludovic@xamarin.com>
Thu, 16 Feb 2017 01:56:49 +0000
(20:56 -0500)
committer
GitHub
<noreply@github.com>
Thu, 16 Feb 2017 01:56:49 +0000
(20:56 -0500)
If fd is equals to FD_SETSIZE, then we pass (FD_SETSIZE + 1) as first parameter to select, making it return EINVAL.
mono/utils/mono-poll.c
patch
|
blob
|
history
diff --git
a/mono/utils/mono-poll.c
b/mono/utils/mono-poll.c
index 74d39ced0c0292f1c365af67aa5ad8fc8351e9a0..d81b4eb9168f050626d4afd5ab31628fd5d061fa 100755
(executable)
--- a/
mono/utils/mono-poll.c
+++ b/
mono/utils/mono-poll.c
@@
-60,7
+60,7
@@
mono_poll (mono_pollfd *ufds, unsigned int nfds, int timeout)
return 1;
}
#else
- if (fd > FD_SETSIZE) {
+ if (fd >
=
FD_SETSIZE) {
ufds [i].revents = MONO_POLLNVAL;
return 1;
}