projects
/
platform
/
upstream
/
ecore.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b8fa78
)
Fix a bug when fd is negative (what is possible --see poll man page--)
51/8751/1
author
José Bollo
<jose.bollo@eurogiciel.fr>
Mon, 26 Aug 2013 10:06:37 +0000
(12:06 +0200)
committer
José Bollo
<jose.bollo@eurogiciel.fr>
Mon, 26 Aug 2013 10:06:37 +0000
(12:06 +0200)
src/lib/ecore/ecore_glib.c
patch
|
blob
|
history
diff --git
a/src/lib/ecore/ecore_glib.c
b/src/lib/ecore/ecore_glib.c
index
a4db0ab
..
063e0a0
100644
(file)
--- a/
src/lib/ecore/ecore_glib.c
+++ b/
src/lib/ecore/ecore_glib.c
@@
-84,6
+84,10
@@
_ecore_glib_context_poll_from(const GPollFD *pfds,
for (; itr < itr_end; itr++)
{
+ /* ignore invalid values (mainly negative ones) */
+ if (itr->fd <0 || itr->fd >= FD_SETSIZE)
+ continue;
+
if (glib_fds < itr->fd)
glib_fds = itr->fd;
@@
-110,6
+114,10
@@
_ecore_glib_context_poll_to(GPollFD *pfds,
for (; (itr < itr_end) && (ready > 0); itr++)
{
+ /* ignore invalid values (mainly negative ones) */
+ if (itr->fd <0 || itr->fd >= FD_SETSIZE)
+ continue;
+
itr->revents = 0;
if (FD_ISSET(itr->fd, rfds) && (itr->events & G_IO_IN))
{