diff --git a/0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch b/0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch new file mode 100644 index 0000000..176e061 --- /dev/null +++ b/0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch @@ -0,0 +1,50 @@ +>From 829037395f8b93e69a30852a95e378f78c3ccd6b Mon Sep 17 00:00:00 2001 +From: Luc Verhaegen +Date: Wed, 12 Nov 2008 17:09:33 +0100 +Subject: [PATCH] Xinput: Catch missing configlayout when deleting device. + +In DeleteInputDeviceRequest (xf86Xinput.c), we access idev members +even if idev is null. This takes down the xserver hard in some cases +(kernel SIGABRT), and segfaults on other cases. +--- + hw/xfree86/common/xf86Xinput.c | 23 +++++++++++++---------- + 1 files changed, 13 insertions(+), 10 deletions(-) + +diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c +index 710e787..c0b6124 100644 +--- a/hw/xfree86/common/xf86Xinput.c ++++ b/hw/xfree86/common/xf86Xinput.c +@@ -466,17 +466,20 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) + else + xf86DeleteInput(pInfo, 0); + +- /* devices added through HAL aren't in the config layout */ +- it = xf86ConfigLayout.inputs; +- while(*it && *it != idev) +- it++; +- +- if (!(*it)) /* end of list, not in the layout */ ++ if (idev) + { +- xfree(idev->driver); +- xfree(idev->identifier); +- xf86optionListFree(idev->commonOptions); +- xfree(idev); ++ /* devices added through HAL aren't in the config layout */ ++ it = xf86ConfigLayout.inputs; ++ while(*it && *it != idev) ++ it++; ++ ++ if (!(*it)) /* end of list, not in the layout */ ++ { ++ xfree(idev->driver); ++ xfree(idev->identifier); ++ xf86optionListFree(idev->commonOptions); ++ xfree(idev); ++ } + } + } + +-- +1.5.2.4 + diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index 8835718..95a7cb9 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Nov 13 17:55:01 CET 2008 - sndirsch@suse.de + +- 0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch + * In DeleteInputDeviceRequest (xf86Xinput.c), we access idev + members even if idev is null. This takes down the xserver + hard in some cases (kernel SIGABRT), and segfaults on other + cases (Luc Verhaegen). + ------------------------------------------------------------------- Sat Nov 8 05:22:55 CET 2008 - sndirsch@suse.de diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 57c42fc..09f3a3d 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -29,7 +29,7 @@ BuildRequires: libjpeg-devel Url: http://xorg.freedesktop.org/ %define EXPERIMENTAL 0 Version: 7.4 -Release: 14 +Release: 15 License: X11/MIT BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/X11/Servers/XF86_4 @@ -102,6 +102,7 @@ Patch121: miPointerUpdate-crashfix.diff Patch122: unplugged_monitor_crashfix.diff Patch123: vidmode-sig11.diff Patch124: commit-59f9fb4b8.diff +Patch125: 0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch %description This package contains the X.Org Server. @@ -219,6 +220,7 @@ popd %patch122 -p0 %patch123 -p0 %patch124 -p1 +%patch125 -p1 %build pushd xorg-docs-* @@ -535,6 +537,12 @@ exit 0 %endif %changelog +* Thu Nov 13 2008 sndirsch@suse.de +- 0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch + * In DeleteInputDeviceRequest (xf86Xinput.c), we access idev + members even if idev is null. This takes down the xserver + hard in some cases (kernel SIGABRT), and segfaults on other + cases (Luc Verhaegen). * Sat Nov 08 2008 sndirsch@suse.de - commit-59f9fb4b8.diff * XAA PixmapOps: Sync before accessing unwrapped callbacks.