From 98393c03d2a370529cb10b06b557d29629db2c2a Mon Sep 17 00:00:00 2001 From: 66hh <49398720+66hh@users.noreply.github.com> Date: Sat, 27 Dec 2025 16:56:48 +0800 Subject: [PATCH] Add a check before the conversion path --- src/windows-emulator/syscalls/file.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/windows-emulator/syscalls/file.cpp b/src/windows-emulator/syscalls/file.cpp index 25bfb3c8..43fe8497 100644 --- a/src/windows-emulator/syscalls/file.cpp +++ b/src/windows-emulator/syscalls/file.cpp @@ -1014,6 +1014,12 @@ namespace syscalls std::error_code ec{}; const windows_path path = f.name; + + if (!path.is_absolute()) + { + return STATUS_OBJECT_NAME_NOT_FOUND; + } + const bool is_directory = std::filesystem::is_directory(c.win_emu.file_sys.translate(path), ec); if (is_directory || create_options & FILE_DIRECTORY_FILE)