Re: [PATCH x11spice] Fix hang when launching with invalid config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> When launching with no config file or arguments, the "You must provide
> some authentication method" dialog appears. Clicking the Close button
> would hang the application and it would never quit.
> 
> s->draw_command_in_progress was uninitialized, and flush_and_lock()
> would get stuck in an infinite loop waiting for it to be 0.
> 
> Initialize s->draw_command_in_progress to 0.
> 
> Signed-off-by: Brendan Shanks <bshanks@xxxxxxxxxxxxxxx>
> ---
>  src/session.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/session.c b/src/session.c
> index 1e59415..c5a439c 100644
> --- a/src/session.c
> +++ b/src/session.c
> @@ -306,6 +306,7 @@ int session_create(session_t *s)
>      s->connected = FALSE;
>      s->connect_pid = 0;
>      s->disconnect_pid = 0;
> +    s->draw_command_in_progress = 0;

Why not using FALSE instead?

>  
>      if (s->options.audit)
>          rc = begin_audit(s);

Maybe it would be also safe to initialize the "session" variable in main
with a memset?

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]