Package: xserver-xorg-input-mouse
Version: 1:1.7.2-2
Severity: serious
Tags: patch
User: debian-...@lists.debian.org
Usertags: kfreebsd
X-Debbugs-Cc: debian-...@lists.debian.org
Hi.
The current version of xserver segfaults under kfreebsd-amd64.
[ 237.968] (II) Using input driver 'mouse' for 'Configured Mouse'
[ 237.968] (**) Option "CorePointer" "on"
[ 237.968] (**) Configured Mouse: always reports core events
[ 237.968]
[ 237.968] Backtrace:
[ 237.968] 0: Xorg (xorg_backtrace+0x36) [0x5641a6]
[ 237.968] 1: Xorg (0x400000+0x167cc9) [0x567cc9]
[ 237.968] 2: /lib/x86_64-kfreebsd-gnu/libpthread.so.0 (0x8014cc000+0xbf04)
[0x8014d7f04]
It is due to buggy workaround of gcc bug #665390.
Please just replace bsd-array-bounds.diff with attached one.
I believe it will solve also #678124 and
http://lists.debian.org/debian-bsd/2012/07/msg00068.html
Petr
Index: xserver-xorg-input-mouse/src/bsd_mouse.c
===================================================================
--- xserver-xorg-input-mouse.orig/src/bsd_mouse.c
+++ xserver-xorg-input-mouse/src/bsd_mouse.c
@@ -139,10 +139,10 @@ CheckProtocol(const char *protocol)
{
int i;
- for (i = 0; internalNames[i]; i++)
+ for (i = -1; internalNames[++i];)
if (xf86NameCmp(protocol, internalNames[i]) == 0)
return TRUE;
- for (i = 0; miscNames[i]; i++)
+ for (i = -1; miscNames[++i];)
if (xf86NameCmp(protocol, miscNames[i]) == 0)
return TRUE;
return FALSE;