From 6fe0fa30f23fb857864a26cbad58320cc3ef3112 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 29 Aug 2019 21:01:33 +0200 Subject: [PATCH] Kernel: Fix broken passing of String as printf() argument in realpath() --- Kernel/Process.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 4f3859e5a3b..73747353760 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -1866,8 +1866,8 @@ int Process::sys$realpath(const char* pathname, char* buffer, size_t size) // FIXME: Once resolve_path is fixed to deal with .. and . , remove the use of FileSystemPath::canonical_path. FileSystemPath canonical_path(custody->absolute_path()); if (!canonical_path.is_valid()) { - printf("FileSystemPath failed to canonicalize '%s'\n", custody->absolute_path()); - return 1; + dbg() << "FileSystemPath failed to canonicalize " << custody->absolute_path(); + ASSERT_NOT_REACHED(); } strncpy(buffer, canonical_path.string().characters(), size);