From 7954eab1ecbc5ceb4c3e0f11da63da458098aec9 Mon Sep 17 00:00:00 2001 From: DavidXanatos <3890945+DavidXanatos@users.noreply.github.com> Date: Thu, 21 Dec 2023 22:46:50 +0100 Subject: [PATCH] 1.12.6 --- CHANGELOG.md | 3 ++- Sandboxie/core/dll/file_init.c | 6 +++--- Sandboxie/core/dll/file_link.c | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6fd406d..aff5a858 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - fixed Sandboxie-Plus 1.12.4 + failed to start start.exe in confidential box [#3514](https://github.com/sandboxie-plus/Sandboxie/issues/3514) -- fixed fix for [#3475](https://github.com/sandboxie-plus/Sandboxie/issues/3475) not working without FileRootPath being explicitly set - fixed "The directory name is invalid" when starting a process in a encrypted private box [#3475](https://github.com/sandboxie-plus/Sandboxie/issues/3475) +- fixed symbolic links created inside a sandbox not working properly [#3181](https://github.com/sandboxie-plus/Sandboxie/issues/3181) +- fixed issue with drives mounted to multiple fodlers or a drive lettet and a folder diff --git a/Sandboxie/core/dll/file_init.c b/Sandboxie/core/dll/file_init.c index 23ba32b9..b607bd82 100644 --- a/Sandboxie/core/dll/file_init.c +++ b/Sandboxie/core/dll/file_init.c @@ -858,7 +858,7 @@ _FX void File_InitLinks(THREAD_DATA *TlsData) save_char = DeviceName[DeviceNameLen]; DeviceName[DeviceNameLen] = L'\0'; - if (Output2->MultiSzLength) { + if (Output2->MultiSzLength && *Output2->MultiSz) { WCHAR *DosPath = Output2->MultiSz; ULONG DosPathLen = wcslen(DosPath); @@ -890,10 +890,10 @@ _FX void File_InitLinks(THREAD_DATA *TlsData) // WCHAR *FirstDosPath = DosPath; - File_AddLink(TRUE, DeviceName, FirstDosPath); + File_AddLink(TRUE, FirstDosPath, DeviceName); DosPath += DosPathLen + 1; while (*DosPath) { - File_AddLink(TRUE, DosPath, FirstDosPath); + File_AddLink(TRUE, DosPath, DeviceName); DosPath += wcslen(DosPath) + 1; } } diff --git a/Sandboxie/core/dll/file_link.c b/Sandboxie/core/dll/file_link.c index 601a9237..806442b9 100644 --- a/Sandboxie/core/dll/file_link.c +++ b/Sandboxie/core/dll/file_link.c @@ -1276,15 +1276,15 @@ _FX FILE_LINK *File_FindPermLinksForMatchPath( link = List_Head(File_PermLinks); while (link) { - const ULONG dst_len = link->dst_len; + const ULONG src_len = link->src_len; if ( #ifdef WOW64_FS_REDIR link != File_Wow64FileLink && #endif WOW64_FS_REDIR - name_len >= dst_len && - (name[dst_len] == L'\\' || name[dst_len] == L'\0') && - _wcsnicmp(name, link->dst, dst_len) == 0) { + name_len >= src_len && + (name[src_len] == L'\\' || name[src_len] == L'\0') && + _wcsnicmp(name, link->src, src_len) == 0) { return link; }