[PATCH] vfb: add a name to the pointer and keyboard
Fernando Carrijo
fcarrijo at yahoo.com.br
Sat Apr 3 13:13:27 PDT 2010
Hi Julien,
Julien Cristau <jcristau at debian.org> wrote:
> Fixes a crash in XIQueryDevice which calls strlen on a NULL pointer.
>
> at ../../Xi/xiquerydevice.c:204
> 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 | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c
> index 35d1dc4..3136e93 100644
> --- a/hw/vfb/InitInput.c
> +++ b/hw/vfb/InitInput.c
> @@ -139,7 +139,9 @@ InitInput(int argc, char *argv[])
> p = AddInputDevice(serverClient, vfbMouseProc, TRUE);
> k = AddInputDevice(serverClient, vfbKeybdProc, TRUE);
> RegisterPointerDevice(p);
> + p->name = strdup("mouse");
Under shortage of memory, strdup() will return a NULL pointer.
> RegisterKeyboardDevice(k);
> + k->name = strdup("keyboard");
> (void)mieqInit();
> }
>
> --
> 1.7.0.3
The same applies for your second patch. With that fixed,
Reviewed-by: Fernando Carrijo <fcarrijo at yahoo.com.br>
More information about the xorg-devel
mailing list