ksprintf() should null-terminate strings.

This commit is contained in:
Andreas Kling 2018-10-18 15:24:07 +02:00
parent c149d2a8f0
commit 6ab0649ad6
Notes: sideshowbarker 2024-07-19 18:46:18 +09:00

View file

@ -140,6 +140,7 @@ int ksprintf(char* buffer, const char* fmt, ...)
va_list ap;
va_start(ap, fmt);
int ret = kprintfInternal(buffer_putch, buffer, fmt, ap);
buffer[ret] = '\0';
va_end(ap);
return ret;
}