diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eb1f2cc..75c20463 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - fixed issue with auto updater not offering version updates +- fixed issue with new symlink handling code [#3340](https://github.com/sandboxie-plus/Sandboxie/issues/3340) diff --git a/Sandboxie/core/dll/file_link.c b/Sandboxie/core/dll/file_link.c index 775e606c..0a5e92e2 100644 --- a/Sandboxie/core/dll/file_link.c +++ b/Sandboxie/core/dll/file_link.c @@ -999,7 +999,11 @@ _FX FILE_LINK *File_AddTempLink(WCHAR *path) if (input_str) { - newpath = File_TranslateTempLinks_2(input_str, wcslen(input_str)); + ULONG input_len = wcslen(input_str); + while (input_len > 0 && input_str[input_len - 1] == L'\\') + input_len -= 1; // remove tailing back slash + + newpath = File_TranslateTempLinks_2(input_str, input_len); if (input_str != reparseDataBuffer->MountPointReparseBuffer.PathBuffer) Dll_Free(input_str);