[PATCH] vfb: add a name and type to the pointer and keyboard

Peter Hutterer peter.hutterer at who-t.net
Tue Apr 13 18:50:13 PDT 2010


On Tue, Apr 13, 2010 at 10:28:36PM +0200, Julien Cristau wrote:
> Fixes a crash in XIQueryDevice which calls strlen on a NULL pointer.
> 
>  #0  strlen () at ../sysdeps/x86_64/strlen.S:31
>  #1  0x00000000004c16ed in SizeDeviceInfo (dev=0x969bd0)
>      at ../../Xi/xiquerydevice.c:204
>  #2  0x00000000004c1a01 in ProcXIQueryDevice (client=0xa57510)
>      at ../../Xi/xiquerydevice.c:98
> 
> Debian bug#575905 <http://bugs.debian.org/575905>
> 
> Reported-by: "Bernhard R. Link" <brlink at debian.org>
> Signed-off-by: Julien Cristau <jcristau at debian.org>
> ---
>  hw/vfb/InitInput.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c
> index 35d1dc4..924c085 100644
> --- a/hw/vfb/InitInput.c
> +++ b/hw/vfb/InitInput.c
> @@ -136,10 +136,15 @@ void
>  InitInput(int argc, char *argv[])
>  {
>      DeviceIntPtr p, k;
> +    Atom xiclass;
>      p = AddInputDevice(serverClient, vfbMouseProc, TRUE);
>      k = AddInputDevice(serverClient, vfbKeybdProc, TRUE);
>      RegisterPointerDevice(p);
> +    xiclass = MakeAtom(XI_MOUSE, sizeof(XI_MOUSE) - 1, TRUE);
> +    AssignTypeAndName(p, xiclass, "Xvfb mouse");
>      RegisterKeyboardDevice(k);
> +    xiclass = MakeAtom(XI_KEYBOARD, sizeof(XI_KEYBOARD) - 1, TRUE);
> +    AssignTypeAndName(k, xiclass, "Xvfb keyboard");
>      (void)mieqInit();
>  }
>  

merged, thank you!

Cheers,
  Peter


More information about the xorg-devel mailing list