From 1192c616d10f13dd4403cc64f0986600f895e719 Mon Sep 17 00:00:00 2001 From: J Reece Wilson Date: Wed, 13 Apr 2022 12:38:26 +0100 Subject: [PATCH] [*] Amend UNIX module path resolution --- Source/Process/Paths.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/Process/Paths.cpp b/Source/Process/Paths.cpp index 958d9c1d..6f232cb5 100644 --- a/Source/Process/Paths.cpp +++ b/Source/Process/Paths.cpp @@ -135,10 +135,20 @@ namespace Aurora::Process "/proc/curproc/file" }; + if (!AuTryResize(path, 8192)) + { + return false; + } + for (const auto &name : procFsPaths) { - if (AuIOFS::ReadString(name, path)) + ssize_t count; + if ((count = readlink(name.c_str(), &path[0], path.size())) > 0) { + if (!AuTryResize(path, count)) + { + return false; + } splitter = '/'; return true; }