diff --git a/numad.c b/numad.c index a6a7a5d..25363a2 100644 --- a/numad.c +++ b/numad.c @@ -153,7 +153,7 @@ void numad_log(int level, const char *fmt, ...) { *p++ = ' '; va_list ap; va_start(ap, fmt); - vsnprintf(p, BUF_SIZE, fmt, ap); + vsnprintf(p, BUF_SIZE - strlen(buf) , fmt, ap); va_end(ap); fprintf(log_fs, "%s", buf); fflush(log_fs);