*bump*

This one came up on IRC again the other day.
--Jason Ekstrand


On Tue, Apr 9, 2013 at 4:59 PM, Jason Ekstrand <[email protected]> wrote:

> Valgrind complains because sometimes padding at the ends of strings and
> arrays
> is left uninitialized.  Zeroing out the buffer fixes this problem.
>
> Signed-off-by: Jason Ekstrand <[email protected]>
> ---
>  src/connection.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/connection.c b/src/connection.c
> index 9425ca6..f79b6d0 100644
> --- a/src/connection.c
> +++ b/src/connection.c
> @@ -1018,6 +1018,8 @@ wl_closure_send(struct wl_closure *closure, struct
> wl_connection *connection)
>         uint32_t buffer[256];
>         int size;
>
> +       memset(buffer, 0, sizeof buffer);
> +
>         if (copy_fds_to_connection(closure, connection))
>                 return -1;
>
> @@ -1034,6 +1036,8 @@ wl_closure_queue(struct wl_closure *closure, struct
> wl_connection *connection)
>         uint32_t buffer[256];
>         int size;
>
> +       memset(buffer, 0, sizeof buffer);
> +
>         if (copy_fds_to_connection(closure, connection))
>                 return -1;
>
> --
> 1.8.1.4
>
>
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to