From 6ab0649ad69a6936c4c7540a934cda60f1a20ee2 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 18 Oct 2018 15:24:07 +0200 Subject: [PATCH] ksprintf() should null-terminate strings. --- Kernel/VGA.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Kernel/VGA.cpp b/Kernel/VGA.cpp index 8f23cf9b67..5949f0ad0e 100644 --- a/Kernel/VGA.cpp +++ b/Kernel/VGA.cpp @@ -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; }