From dfb91396eb9ab5abd57dcf841bb5eceb04e85d2e Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 10:12:59 +0000 Subject: [PATCH] Fix: Handle empty input path in Win32 path normalization to prevent invalid API calls --- .../Source/Win32Device/Common/Win32LocalFileSystem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Core/GameEngineDevice/Source/Win32Device/Common/Win32LocalFileSystem.cpp b/Core/GameEngineDevice/Source/Win32Device/Common/Win32LocalFileSystem.cpp index 84236de436b..24b808fc092 100644 --- a/Core/GameEngineDevice/Source/Win32Device/Common/Win32LocalFileSystem.cpp +++ b/Core/GameEngineDevice/Source/Win32Device/Common/Win32LocalFileSystem.cpp @@ -214,6 +214,12 @@ Bool Win32LocalFileSystem::createDirectory(AsciiString directory) AsciiString Win32LocalFileSystem::normalizePath(const AsciiString& filePath) const { + // Check if the input path is empty to avoid passing invalid parameters to GetFullPathNameA + if (filePath.isEmpty()) + { + return AsciiString::TheEmptyString; + } + DWORD retval = GetFullPathNameA(filePath.str(), 0, NULL, NULL); if (retval == 0) {