[PATCH wayland] connection: Handle empty signature and signature with just a version.

Jason Ekstrand jason at jlekstrand.net
Wed Jul 10 15:39:16 PDT 2013


We talked about this on IRC. looks good to me.
On Jul 10, 2013 4:42 PM, "Mariusz Ceier" <mceier+wayland at gmail.com> wrote:

> Functions like wl_argument_from_va_list expect from get_next_argument,
> to initialize details->type but when the signature is empty or contains
> only version (like in desktop-shell-protocol.c in weston) it is left
> uninitialized.
>
> This patch fixes it, by initializing details->type with '\0' value,
> signaling end of arguments.
>
> Signed-off-by: Mariusz Ceier <mceier+wayland at gmail.com>
> ---
>  src/connection.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/connection.c b/src/connection.c
> index 2ca9bce..9bb850c 100644
> --- a/src/connection.c
> +++ b/src/connection.c
> @@ -419,6 +419,7 @@ get_next_argument(const char *signature, struct
> argument_details *details)
>                         details->nullable = 1;
>                 }
>         }
> +       details->type = '\0';
>         return signature;
>  }
>
> --
> 1.8.3.2
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130710/63c271d7/attachment.html>


More information about the wayland-devel mailing list