diff options
Diffstat (limited to 'x11-base/xorg-server/files/1.4.0.90/0021-xkb-don-t-update-LEDs-if-they-don-t-exist.-Bug-13.patch')
-rw-r--r-- | x11-base/xorg-server/files/1.4.0.90/0021-xkb-don-t-update-LEDs-if-they-don-t-exist.-Bug-13.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/x11-base/xorg-server/files/1.4.0.90/0021-xkb-don-t-update-LEDs-if-they-don-t-exist.-Bug-13.patch b/x11-base/xorg-server/files/1.4.0.90/0021-xkb-don-t-update-LEDs-if-they-don-t-exist.-Bug-13.patch new file mode 100644 index 000000000000..5bbcfc33dcc5 --- /dev/null +++ b/x11-base/xorg-server/files/1.4.0.90/0021-xkb-don-t-update-LEDs-if-they-don-t-exist.-Bug-13.patch @@ -0,0 +1,31 @@ +From bc72ef3a159efd67067322c043bba444869dc356 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed, 30 Jan 2008 10:39:54 +1030 +Subject: [PATCH] xkb: don't update LEDs if they don't exist. (Bug #13961) + +In some weird cases we call this function when there is no SrvLedInfo on the +device. And it turns out null-pointer dereferences are bad. + +X.Org Bug 13961 <http://bugs.freedesktop.org/show_bug.cgi?id=13961> +(cherry picked from commit d954f9c80348de294602d931d387e5cd1ef4b9a5) +--- + xkb/xkbLEDs.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c +index d607d90..d28973c 100644 +--- a/xkb/xkbLEDs.c ++++ b/xkb/xkbLEDs.c +@@ -63,6 +63,9 @@ XkbSrvLedInfoPtr sli; + + sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0); + ++ if (!sli) ++ return update; ++ + if (state_changes&(XkbModifierStateMask|XkbGroupStateMask)) + update|= sli->usesEffective; + if (state_changes&(XkbModifierBaseMask|XkbGroupBaseMask)) +-- +1.5.5.1 + |