Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos committed Apr 28, 2024
1 parent 846a3ea commit e194528
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Sandboxie/core/dll/file.c
Expand Up @@ -265,6 +265,9 @@ static NTSTATUS File_NtDeleteFile(OBJECT_ATTRIBUTES *ObjectAttributes);

static NTSTATUS File_NtDeleteFileImpl(OBJECT_ATTRIBUTES *ObjectAttributes);

static WCHAR *File_ConcatPath2(
const WCHAR *Path1, ULONG Path1Len, const WCHAR *Path2, ULONG Path2Len);

static WCHAR* File_CanonizePath(
const wchar_t* absolute_path, ULONG abs_path_len, const wchar_t* relative_path, ULONG rel_path_len);

Expand Down
6 changes: 3 additions & 3 deletions Sandboxie/core/dll/file_init.c
Expand Up @@ -1671,11 +1671,11 @@ _FX WCHAR *File_AllocAndInitEnvironment_2(

_FX WCHAR *File_ConcatPath2(const WCHAR *Path1, ULONG Path1Len, const WCHAR *Path2, ULONG Path2Len)
{
ULONG len_dos = Path1Len + Path2Len;
WCHAR* Path = Dll_Alloc((len_dos + 1) * sizeof(WCHAR));
ULONG Length = Path1Len + Path2Len;
WCHAR* Path = Dll_Alloc((Length + 1) * sizeof(WCHAR));
wmemcpy(Path, Path1, Path1Len);
wmemcpy(Path + Path1Len, Path2, Path2Len);
Path[len_dos] = L'\0';
Path[Length] = L'\0';
return Path;
}

Expand Down
3 changes: 1 addition & 2 deletions Sandboxie/core/dll/file_link.c
Expand Up @@ -329,8 +329,7 @@ _FX FILE_GUID *File_GetLinkForGuid(const WCHAR* guid_str)

_FX WCHAR* File_TranslateGuidToNtPath2(const WCHAR* GuidPath, ULONG GuidPathLen)
{
ULONG len;
WCHAR* NtPath;
WCHAR* NtPath = NULL;

if (GuidPath && GuidPathLen >= 48 && _wcsnicmp(GuidPath, L"\\??\\Volume{", 11) == 0) {

Expand Down

0 comments on commit e194528

Please sign in to comment.