mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-05 00:00:45 -04:00
bus: Properly va_copy() argument list before passing it to printf() functions
As we later potentially use args again, we can't consume it with printf functions without copying it first. Clone list before passing it to any consuming function. Fixes #621.
This commit is contained in:
parent
758dc8a953
commit
8b855a97c2
@ -391,7 +391,9 @@ METHOD(bus_t, vlog, void,
|
||||
{
|
||||
len++;
|
||||
data.message = malloc(len);
|
||||
len = vsnprintf(data.message, len, format, args);
|
||||
va_copy(data.args, args);
|
||||
len = vsnprintf(data.message, len, format, data.args);
|
||||
va_end(data.args);
|
||||
}
|
||||
if (len > 0)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user