[PATCH] xserver: Fix segfault in tslib driver
Alan Coopersmith
Alan.Coopersmith at Sun.COM
Mon Apr 6 07:11:18 PDT 2009
That needs to be strdup in master now:
http://cgit.freedesktop.org/xorg/xserver/commit/?id=d2690375dfd994817f004cda133ca2a492c0b956
David Jander wrote:
> When xserver is started with the option '-mouse tslib' the tslib-driver opens
> the default device "/dev/input/touchscreen0", but the device path-name points
> to a constant string which is later freed with xfree ---> Segfault!
>
> Signed-off-by: David Jander <david.jander at protonic.nl>
> ---
> diff --git a/hw/kdrive/linux/tslib.c b/hw/kdrive/linux/tslib.c
> index 7ad7a88..3c76473 100644
> --- a/hw/kdrive/linux/tslib.c
> +++ b/hw/kdrive/linux/tslib.c
> @@ -114,7 +114,7 @@ TslibEnable (KdPointerInfo *pi)
> private->raw_event_hook = NULL;
> private->raw_event_closure = NULL;
> if (!pi->path) {
> - pi->path = "/dev/input/touchscreen0";
> + pi->path = KdSaveString("/dev/input/touchscreen0");
> ErrorF("[tslib/TslibEnable] no device path given, trying %s\n",
> pi->path);
> }
> private->tsDev = ts_open(pi->path, 0);
> _______________________________________________
> xorg-devel mailing list
> xorg-devel at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-devel
--
-Alan Coopersmith- alan.coopersmith at sun.com
Sun Microsystems, Inc. - X Window System Engineering
More information about the xorg-devel
mailing list