[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg-server: Changes to 'ubuntu'



 debian/changelog                                             |   14 ++
 debian/patches/155_no_checkmotion_for_disabled_devices.patch |   53 +++++------
 debian/patches/156_exevents_copykeyclass_nullptrcheck.patch  |   20 ++++
 debian/patches/series                                        |    1 
 4 files changed, 59 insertions(+), 29 deletions(-)

New commits:
commit 61066ae446805b21ae56465e8f9d4c2dc641a71d
Author: Bryce Harrington <bryce@bryceharrington.org>
Date:   Thu Jan 15 23:28:31 2009 -0800

    Fix up patch 155 to better match the latest changes in the upstream tree
    regarding this bug.
    
    Add patch 156 with nullptr checks for inside CopyKeyClass() itself, to
    prevent segfaults like in bug 311254.

diff --git a/debian/changelog b/debian/changelog
index d7f1add..e4e136c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,14 +6,20 @@ xorg-server (2:1.5.99.3-0ubuntu4) UNRELEASED; urgency=low
   * Disable patch 107 for now, to see what kind of a performance hit 
     it'll be. The problem it causes is random garbage on windows
     while apps are being loaded.
+    (LP: #254468)
   * Remove patches 150, 151, applied upstream.
 
   [Bryce Harrington]
   * 155_no_checkmotion_for_disabled_devices.patch: Cherrypick upstream
-    patch to fix crash when a device is not enabled (such as after a
-    suspend/resume).  LP: #313567
-
- -- Bryce Harrington <bryce@ubuntu.com>  Thu, 08 Jan 2009 18:30:42 -0800
+    changes to fix crash when a device is not enabled (such as after a
+    suspend/resume).
+    (LP: #313567)
+  * 156_exevents_copykeyclass_nullptrcheck.patch: Add several NULL pointer
+    checks in CopyKeyClass to prevent SEGFAULT seen when pressing button
+    on an ATI USB remote control.
+    (LP: #311254)
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Thu, 15 Jan 2009 23:26:13 -0800
 
 xorg-server (2:1.5.99.3-0ubuntu3) jaunty; urgency=low
 
diff --git a/debian/patches/155_no_checkmotion_for_disabled_devices.patch b/debian/patches/155_no_checkmotion_for_disabled_devices.patch
index 00d4a54..24fb3d3 100644
--- a/debian/patches/155_no_checkmotion_for_disabled_devices.patch
+++ b/debian/patches/155_no_checkmotion_for_disabled_devices.patch
@@ -1,27 +1,30 @@
-commit e1a3a1a0d85c9971aea65c2228b5fd4dbf3bf57a
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Tue Dec 23 10:00:34 2008 +1000
-
-    xfree86: don't call CheckMotion if a device hasn't been enabled. #19176
-    
-    X.Org Bug <http://bugs.freedesktop.org/show_bug.cgi?id=19176>
-
-diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
-index fe62772..e39c087 100644
---- a/hw/xfree86/common/xf86Xinput.c
-+++ b/hw/xfree86/common/xf86Xinput.c
-@@ -549,10 +549,11 @@ xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL enable)
-     ActivateDevice(dev);
-     /* Enable it if it's properly initialised and we're currently in the VT */
-     if (enable && dev->inited && dev->startup && xf86Screens[0]->vtSema)
-+    {
-         EnableDevice(dev);
+diff -Nurp patched/mi/mieq.c working/mi/mieq.c
+--- patched/mi/mieq.c	2009-01-15 23:18:21.000000000 -0800
++++ working/mi/mieq.c	2009-01-15 23:23:01.000000000 -0800
+@@ -354,17 +354,15 @@ mieqProcessInputEvents(void)
+             NewCurrentScreen (dev, DequeueScreen(dev), x, y);
+         }
+         else {
+-            /* Force a copy of the key class into the VCK so that the layout
+-               is transferred. */
+-            if (event->u.u.type == DeviceKeyPress ||
+-                event->u.u.type == DeviceKeyRelease)
+-                CopyKeyClass(dev, master);
 -
--    /* send enter/leave event, update sprite window */
--    CheckMotion(NULL, dev);
-+        /* send enter/leave event, update sprite window */
-+        CheckMotion(NULL, dev);
-+    }
+-            if (master)
+-                CopyGetMasterEvent(master, event,
+-                                   &master_event, nevents);
+-            else
+-                master_event = NULL;
++            if (master) {
++                /* Force a copy of the key class into the VCK so that the layout
++                   is transferred. */
++                if (event->u.u.type == DeviceKeyPress ||
++                    event->u.u.type == DeviceKeyRelease)
++                    CopyKeyClass(dev, master);
++
++                CopyGetMasterEvent(master, event, masterEvents, nevents);
++            }
  
-     *pdev = dev;
-     return Success;
+             /* If someone's registered a custom event handler, let them
+              * steal it. */
diff --git a/debian/patches/156_exevents_copykeyclass_nullptrcheck.patch b/debian/patches/156_exevents_copykeyclass_nullptrcheck.patch
new file mode 100644
index 0000000..06bd5ab
--- /dev/null
+++ b/debian/patches/156_exevents_copykeyclass_nullptrcheck.patch
@@ -0,0 +1,20 @@
+diff -Nurp patched/Xi/exevents.c working/Xi/exevents.c
+--- patched/Xi/exevents.c	2009-01-15 23:02:52.000000000 -0800
++++ working/Xi/exevents.c	2009-01-15 23:09:42.000000000 -0800
+@@ -194,12 +194,15 @@ CopyKeyClass(DeviceIntPtr device, Device
+     BOOL sendNotify = FALSE;
+     int i;
+ 
+-    if (device == master)
++    if (device == master || device == NULL || master == NULL)
+         return;
+ 
+     dk = device->key;
+     mk = master->key;
+ 
++    if (dk == NULL || mk == NULL)
++        return;
++
+     if (device != dixLookupPrivate(&master->devPrivates,
+                                    CoreDevicePrivateKey)) {
+         memcpy(mk->modifierMap, dk->modifierMap, MAP_LENGTH);
diff --git a/debian/patches/series b/debian/patches/series
index b88b453..f15035f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -15,3 +15,4 @@
 153_make_dmx_compile.patch
 154_force-copykeyclass-for-key-events.patch
 155_no_checkmotion_for_disabled_devices.patch
+156_exevents_copykeyclass_nullptrcheck.patch


Reply to: