From 6a6a56a8b4cf72c2cdb9308fdda0e081c196fad3 Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 18 Mar 2023 20:10:00 +0100 Subject: [PATCH] kernel: Make /dev/console actually respect the length parameter instead of trusting userspace's null terminators --- kernel/src/fs/devices/ConsoleDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/src/fs/devices/ConsoleDevice.cpp b/kernel/src/fs/devices/ConsoleDevice.cpp index 4d8910e4..571446ad 100644 --- a/kernel/src/fs/devices/ConsoleDevice.cpp +++ b/kernel/src/fs/devices/ConsoleDevice.cpp @@ -14,6 +14,6 @@ Result ConsoleDevice::read(u8*, usize, usize) const Result ConsoleDevice::write(const u8* buf, usize, usize length) { - TextConsole::print((const char*)buf); + TextConsole::write((const char*)buf, length); return length; }