[PATCH weston 04/10] desktop-shell: fix invalid memory access when shell execution fails

Pekka Paalanen ppaalanen at gmail.com
Wed Aug 27 07:14:50 PDT 2014


On Mon, 25 Aug 2014 20:56:46 +0200
rawoul at gmail.com wrote:

> From: Arnaud Vrac <avrac at freebox.fr>
> 
> In this case wl_client_add_destroy_listener() was called with a NULL
> client, which is invalid.
> ---
>  desktop-shell/shell.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
> index 99f3343..a023281 100644
> --- a/desktop-shell/shell.c
> +++ b/desktop-shell/shell.c
> @@ -5342,8 +5342,10 @@ launch_desktop_shell_process(void *data)
>  						 shell->client,
>  						 desktop_shell_sigchld);
>  
> -	if (!shell->child.client)
> +	if (!shell->child.client) {
>  		weston_log("not able to start %s\n", shell->client);
> +		return;
> +	}
>  
>  	shell->child.client_destroy_listener.notify =
>  		desktop_shell_client_destroy;

Hi,

patches 1, 3, and 4 pushed, 2 and 5 commented. I'll continue reviewing
the rest tomorrow.


Thanks,
pq


More information about the wayland-devel mailing list