mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-03-11 17:08:46 +00:00
Testing: Don't call vsnprintf with NULL format
This commit is contained in:
parent
e3c5cf6637
commit
a7af13730b
@ -202,7 +202,8 @@ bt_log_result(int result, const char *fmt, va_list argptr)
|
|||||||
(fmt && strlen(fmt) > 0) ? ": " : "");
|
(fmt && strlen(fmt) > 0) ? ": " : "");
|
||||||
pos = msg_buf + strlen(msg_buf);
|
pos = msg_buf + strlen(msg_buf);
|
||||||
|
|
||||||
vsnprintf(pos, sizeof(msg_buf) - (pos - msg_buf), fmt, argptr);
|
if (fmt)
|
||||||
|
vsnprintf(pos, sizeof(msg_buf) - (pos - msg_buf), fmt, argptr);
|
||||||
|
|
||||||
int chrs = 0;
|
int chrs = 0;
|
||||||
for (uint i = 0; i < strlen(msg_buf); i += get_num_terminal_cols())
|
for (uint i = 0; i < strlen(msg_buf); i += get_num_terminal_cols())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user