Hi,

currently xset can segfault when trying change the repeat rate using XKB.
The problem is a missing null-pointer check and the fix is a one-liner appended below.

I have no idea whether this is only an linux x86 issue since that is the
only X-platform with XKB I have access to. Since the null pointer is
dereferenced I can't see how this patch could break another platform.

This problem has been at least in versions 4.2.0, 4.2.1 and was still in a
CVS snapshot yesterday. And I am starting to get tired of fixing it
in every X version I upgrade to :-)

//Tapani (not subscribed)

--- xc/programs/xset/xset.c     Tue Feb  4 16:37:46 2003
+++ xset.c      Tue Feb  4 16:22:48 2003
@@ -1092,6 +1092,7 @@
 xkbset_repeatrate(Display *dpy, int delay, int interval)
 {
   XkbDescPtr xkb = XkbGetKeyboard(dpy,XkbControlsMask,XkbUseCoreKbd);
+  if (!xkb) xkb = XkbAllocKeyboard();
   XkbGetControls(dpy, XkbRepeatKeysMask, xkb);
   xkb->ctrls->repeat_delay = delay;
   xkb->ctrls->repeat_interval = interval;

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to