diff --git a/lib/util/debug.c b/lib/util/debug.c index 784357e9370..4143cb6058a 100644 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -1741,8 +1741,9 @@ bool dbghdrclass(int level, int cls, const char *location, const char *func) ensure_hostname(); state.hs_len = snprintf(state.header_str, sizeof(state.header_str), - "%s %s %s[%u]: ", + "%s %.*s %s[%u]: ", tvbuf.buf, + (int)(sizeof(state.hostname) - 1), state.hostname, state.prog_name, (unsigned int) getpid());