2007-10-31 19:28:56 +00:00
|
|
|
From: Kristian Høgsberg <krh@redhat.com>
|
|
|
|
Date: Sun, 28 Oct 2007 09:37:52 +0100
|
|
|
|
Subject: [PATCH] Fix crash in xf86InitOrigins()
|
2005-11-17 15:51:06 +00:00
|
|
|
|
2007-10-31 19:28:56 +00:00
|
|
|
In a multihead setup, if only the first screen can be
|
|
|
|
initialized, but the second screen is mentioned first in the
|
|
|
|
ServerLayout section, the xf86InitOrigins() function will crash
|
|
|
|
because the screen referred to in the e.g. "RightOf" part is
|
|
|
|
non-existent.
|
2005-11-17 15:51:06 +00:00
|
|
|
|
2007-10-31 19:28:56 +00:00
|
|
|
---
|
|
|
|
--- a/hw/xfree86/common/xf86Cursor.c.init-origins-fix 2004-10-18 22:22:42.675899006 -0400
|
|
|
|
+++ b/hw/xfree86/common/xf86Cursor.c 2004-10-18 22:21:42.540867549 -0400
|
2005-11-17 15:51:06 +00:00
|
|
|
@@ -566,6 +566,14 @@
|
|
|
|
|
|
|
|
screen = &xf86ConfigLayout.screens[i];
|
|
|
|
|
|
|
|
+ if (screen->refscreen != NULL &&
|
|
|
|
+ screen->refscreen->screennum >= xf86NumScreens) {
|
|
|
|
+ screensLeft &= ~(1 << i);
|
|
|
|
+ xf86Msg(X_WARNING, "Not including screen \"%s\" in origins calculation.\n",
|
|
|
|
+ screen->screen->id);
|
|
|
|
+ continue;
|
2007-10-31 19:28:56 +00:00
|
|
|
+ }
|
2005-11-17 15:51:06 +00:00
|
|
|
+
|
|
|
|
switch(screen->where) {
|
|
|
|
case PosObsolete:
|
|
|
|
OldStyleConfig = TRUE;
|