Skip to content
Snippets Groups Projects
Commit 076641dc authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Steve Lhomme
Browse files

control: cli: copy va_list before usage

The va_list will be used multiple times, so it needs to be copied before
each usage. Without this, it crashes when doing stop / play.
parent efcb930b
No related branches found
No related tags found
1 merge request!2937control: cli: copy va_list before usage
Pipeline #291405 passed with stage
in 30 minutes and 25 seconds
......@@ -409,7 +409,12 @@ static void msg_vprint(intf_thread_t *p_intf, const char *fmt, va_list args)
vlc_mutex_lock(&sys->clients_lock);
vlc_list_foreach (cl, &sys->clients, node)
cli_vprintf(cl, fmt, args);
{
va_list ap;
va_copy(ap, args);
cli_vprintf(cl, fmt, ap);
va_end(ap);
}
vlc_mutex_unlock(&sys->clients_lock);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment