Fix formatted responses to include the trailing NUL

reverse-scroll
nirenjan 2022-04-02 08:23:55 -07:00
parent 98822190ed
commit f0ad185421
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ static void response_formatted(char *buffer, int *buflen, const char *type,
if (*fmt) { if (*fmt) {
va_start(ap, fmt); va_start(ap, fmt);
resplen += vsnprintf(response + typelen, sizeof(response) - typelen, fmt, ap); resplen += vsnprintf(response + typelen, sizeof(response) - typelen, fmt, ap) + 1;
va_end(ap); va_end(ap);
} }