diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 2c1d335dc..e31030d63 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -939,10 +939,12 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) from = X_CMDLINE; i = -1; if (xf86GetOptValInteger(FlagOptions, FLAG_MAX_CLIENTS, &i)) { - if (i != 64 && i != 128 && i != 256 && i != 512) - ErrorF("MaxClients must be one of 64, 128, 256 or 512\n"); - from = X_CONFIG; - LimitClients = i; + if (Ones(i) != 1 || i < 64 || i > 2048) { + ErrorF("MaxClients must be one of 64, 128, 256, 512, 1024, or 2048\n"); + } else { + from = X_CONFIG; + LimitClients = i; + } } xf86Msg(from, "Max clients allowed: %i, resource mask: 0x%x\n", LimitClients, RESOURCE_ID_MASK);