[PATCH] evdev: fix uninitialised pointer value
Kristian Høgsberg
krh at bitplanet.net
Fri Jan 20 19:13:14 PST 2012
On Fri, Jan 20, 2012 at 11:47 AM, Tiago Vignatti
<vignatti at freedesktop.org> wrote:
> From: Tiago Vignatti <tiago.vignatti at intel.com>
Thanks, pushed.
Kristian
> ==30224== Conditional jump or move depends on uninitialised value(s)
> ==30224== at 0x40EE3A0: evdev_flush_motion (evdev.c:284)
> ==30224== by 0x40EE6DC: evdev_input_device_data (evdev.c:352)
> ==30224== by 0x4034710: wl_event_source_fd_dispatch (event-loop.c:76)
> ==30224== by 0x4035171: wl_event_loop_dispatch (event-loop.c:462)
> ==30224== by 0x4032F76: wl_display_run (wayland-server.c:785)
> ==30224== by 0x8050972: main (compositor.c:2183)
>
> Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
> ---
> src/evdev.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/src/evdev.c b/src/evdev.c
> index 32d7367..f489ede 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -340,6 +340,8 @@ evdev_input_device_data(int fd, uint32_t mask, void *data)
> return 1;
> }
>
> + device->type = 0;
> +
> e = ev;
> end = (void *) ev + len;
> for (e = ev; e < end; e++) {
> --
> 1.7.5.4
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list