1
0
xorg-x11-server/0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch
OBS User autobuild de140e0677 Accepting request 19080 from X11:XOrg
Copy from X11:XOrg/xorg-x11-server based on submit request 19080 from user sndirsch

OBS-URL: https://build.opensuse.org/request/show/19080
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=138
2009-08-28 18:30:20 +00:00

48 lines
1.6 KiB
Diff

>From 829037395f8b93e69a30852a95e378f78c3ccd6b Mon Sep 17 00:00:00 2001
From: Luc Verhaegen <libv@skynet.be>
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(-)
Index: xorg-server-1.6.3.901/hw/xfree86/common/xf86Xinput.c
===================================================================
--- xorg-server-1.6.3.901.orig/hw/xfree86/common/xf86Xinput.c
+++ xorg-server-1.6.3.901/hw/xfree86/common/xf86Xinput.c
@@ -679,17 +679,20 @@ DeleteInputDeviceRequest(DeviceIntPtr pD
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);
+ }
}
}
OsReleaseSignals();