[vlc-commits] [Git][videolan/vlc][master] control: cli: copy va_list before usage
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Dec 9 14:47:34 UTC 2022
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
076641dc by Alexandre Janniaux at 2022-12-09T14:16:39+00:00
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.
- - - - -
1 changed file:
- modules/control/cli/cli.c
Changes:
=====================================
modules/control/cli/cli.c
=====================================
@@ -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);
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/076641dcebbb34b9b8a2313c0cfcd9bbef975e13
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/076641dcebbb34b9b8a2313c0cfcd9bbef975e13
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list