diff --git a/gdbstub.c b/gdbstub.c index 4aafcaa104..48c0c56c84 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1032,6 +1032,7 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, char *fmt, ...) *(p++) = *(fmt++); } } + *p = 0; va_end(va); put_packet(s, buf); #ifdef CONFIG_USER_ONLY