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

Bug#295015: xkbprint segfaults when



Hi!

About 2 years ago, you reported a bug to the Debian BTS regarding a
segfault of xkbprint. Did you reproduce this problem recently? With
Xorg/Etch? If not, I will close this bug in the next weeks.

Yes, that's correct. I had to look at the bug to refresh my memory.
I attempted to reproduce the bug with the packages that I currently have from Debian/testing, but failed to do so. Next I studied the relevant code in psgeom.c that I sent a patch for and it seems that somebody discovered the same flaw in that code and fixed it.

While attempting to reproduce the bug I may have found another -- if I use the following configuration in xorg.conf for the keyboard input device:

       Option          "XkbRules"      "xorg"
       Option          "XkbModel"      "pc105"
       Option          "XkbLayout"     "us"
Option "XkbOptions" "altwin:swap_lalt_lwin,apple:goodmap,caps:internal_nocancel,compose:rctrl,ctrl:swapcaps,eurosign:e,grp:ctrl_shift_toggle,japan:kana_lock,keypad:legacy"

(I know that this configuration is bogus, but it highlights the problem) I get a proper postscript file from xkbprint. When I add lv3:ralt_switch_multikey however, as in this configuration:

       Option          "XkbRules"      "xorg"
       Option          "XkbModel"      "pc105"
       Option          "XkbLayout"     "us"
Option "XkbOptions" "altwin:swap_lalt_lwin,apple:goodmap,caps:internal_nocancel,compose:rctrl,ctrl:swapcaps,eurosign:e,grp:ctrl_shift_toggle,japan:kana_lock,keypad:legacy,lv3:ralt_switch_multikey"

I get a broken postscript file from xkbprint. Diffing the resulting postscript files indicates that the followig rows are the culprit:

--- working.ps  2007-04-15 10:48:48.000000000 +0200
+++ broken.ps   2007-04-15 10:51:27.000000000 +0200
@@ -2588,10 +2588,10 @@
    kby kbdscaleheight add 16 add
    moveto
1 -1 scale (Group 1) show 1 -1 scale
-kbx kbdscalewidth 0 (Layout: pc(pc105)+us+altwin(swap_lalt_lwin)+group(ctrl_shift_toggle)+ctrl(swapcaps)+compose(rctrl)+eurosign) centeroffset pop add +kbx kbdscalewidth 0 (Layout: pc(pc105)+us+altwin(swap_lalt_lwin)+group(ctrl_shift_toggle)+level3(ralt_switch_multikey)+ctrl(swap) centeroffset pop add
    kby kbdscaleheight add 32 add
    moveto
-1 -1 scale (Layout: pc(pc105)+us+altwin(swap_lalt_lwin)+group(ctrl_shift_toggle)+ctrl(swapcaps)+compose(rctrl)+eurosign) show 1 -1 scale +1 -1 scale (Layout: pc(pc105)+us+altwin(swap_lalt_lwin)+group(ctrl_shift_toggle)+level3(ralt_switch_multikey)+ctrl(swap) show 1 -1 scale
kbx kbdscalewidth 0 (Generic 105) centeroffset pop add
    kby kbdscaleheight add 48 add
    moveto

The problem is probably that the setting ctrl(swapcaps) is truncated halfway through the setting to produce ctrl(swap. I believe that the trailng parenthesis fails to end the string as likely was assumed when developing the code. Do you want me to create a new bug report on this issue or is it better to handle this within this bug report?

/ Sebastian

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




Reply to: