Test for overflowing platform FD_SET size.

This commit is contained in:
Simon Kelley
2015-07-08 22:38:13 +01:00
parent 60176c7bf4
commit f6d6956261
5 changed files with 41 additions and 69 deletions

View File

@@ -760,15 +760,13 @@ void set_dbus_listeners(int *maxfdp,
unsigned int flags = dbus_watch_get_flags(w->watch);
int fd = dbus_watch_get_unix_fd(w->watch);
bump_maxfd(fd, maxfdp);
if (flags & DBUS_WATCH_READABLE)
FD_SET(fd, rset);
bump_maxfd(rset, fd, maxfdp);
if (flags & DBUS_WATCH_WRITABLE)
FD_SET(fd, wset);
bump_maxfd(wset, fd, maxfdp);
FD_SET(fd, eset);
bump_maxfd(eset, fd, maxfdp);
}
}