diff options
| author | Mikael Magnusson | 2023-12-15 22:19:47 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2023-12-18 10:47:15 +0000 |
| commit | 730b4656e6b1349506316dab2a8d90399eab39d8 (patch) | |
| tree | 42592a2989c2444425220b4f576bf3c0d3c64c32 | |
| parent | 66a7652176a7580b55076a0975b77c2bfb5bf7ce (diff) | |
netifd: fix undefined va_list value which can cause crashes
Reinitialize the va_list value after the call
to netifd_udebug_vprintf() in netifd_log_message().
It's needed since netifd_udebug_vprintf() invokes vsnprintf()
which in turn invokes the va_arg() macro, and after that call
the va_list value is undefined.
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
| -rw-r--r-- | main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -126,6 +126,9 @@ netifd_log_message(int priority, const char *format, ...) va_start(vl, format); netifd_udebug_vprintf(format, vl); + va_end(vl); + + va_start(vl, format); if (use_syslog) vsyslog(log_class[priority], format, vl); else |