From 2bcf09ff895b9a8786cc63acef499002a97143d5 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 17 Jul 2015 10:59:01 +0100 Subject: [PATCH] os: Fix upper bound for looping over fd_set.fd_mask[] When x11proto was seemingly changed to allow for more file descriptors (and more Clients) by increasing XFD_SETSIZE in commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7 Author: Olivier Fourdan Date: Fri May 29 18:16:34 2015 +0200 Increase the number of file descriptors To allow up to 512 clients, the number of file descriptors being monitored need to be increased accordingly. the actual fd_set.fd_mask[] was not increased as that is defined in terms of FD_SETSIZE and is used by all iterators inside Xpoll.h. X however does iterate over XFD_SETSIZE instead. The result being that we increased the upper bound without increasing the array size with the result we were reading garbage and subsequently crashing. Reported-by: Karol Herbst Reported-by: Tobias Klausmann Signed-off-by: Chris Wilson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91316 Cc: Ilia Mirkin Cc: Martin Peres Cc: Olivier Fourdan Cc: Alan Coopersmith #if defined(XDMCP) || defined(HASXDMAUTH) -- 1.7.10.4