Skip to content

Commit

Permalink
1.11.4
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos committed Sep 30, 2023
1 parent 76fa223 commit 0e175ee
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -12,12 +12,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Changed
- improved lock all boxes behavioure [#3350](https://github.com/sandboxie-plus/Sandboxie/issues/3350)
- fixed type in option name 'NoRestartOnPAC' -> 'NoRestartOnPCA'

### Fixed
- fixed issue with unmounting protected images [#3347](https://github.com/sandboxie-plus/Sandboxie/issues/3347)
- fixed Unable to turn off highlight in Sbie Messages search results [#3338](https://github.com/sandboxie-plus/Sandboxie/issues/3338)
- fixed cannot display programs installed in the sandbox via Run from Start Menu [#3334](https://github.com/sandboxie-plus/Sandboxie/issues/3334)

- fixed issue with NtQueryDirectoryObject [#3310](https://github.com/sandboxie-plus/Sandboxie/issues/3310)



Expand Down
2 changes: 1 addition & 1 deletion Sandboxie/core/dll/dllmain.c
Expand Up @@ -834,7 +834,7 @@ _FX VOID Dll_Ordinal1(INJECT_DATA * inject)

int MustRestartProcess = 0;
if (Dll_ProcessFlags & SBIE_FLAG_PROCESS_IN_PCA_JOB) {
if (!SbieApi_QueryConfBool(NULL, L"NoRestartOnPAC", FALSE))
if (!SbieApi_QueryConfBool(NULL, L"NoRestartOnPCA", FALSE))
MustRestartProcess = 1;
}

Expand Down
34 changes: 20 additions & 14 deletions Sandboxie/core/dll/ipc.c
Expand Up @@ -4344,19 +4344,22 @@ _FX NTSTATUS Ipc_NtQueryDirectoryObject(
ULONG EndIndex = indexCounter + CountToGo;
for (; entry && indexCounter < EndIndex; indexCounter++) {

directoryInfo->Name.Length = entry->Name.Length;
directoryInfo->Name.MaximumLength = entry->Name.MaximumLength;
directoryInfo->Name.Buffer = ptr;
memcpy(ptr, entry->Name.Buffer, entry->Name.MaximumLength);
ptr += directoryInfo->Name.MaximumLength / sizeof(WCHAR);
if (directoryInfo) {

directoryInfo->TypeName.Length = entry->TypeName.Length;
directoryInfo->TypeName.MaximumLength = entry->TypeName.MaximumLength;
directoryInfo->TypeName.Buffer = ptr;
memcpy(ptr, entry->TypeName.Buffer, entry->TypeName.MaximumLength);
ptr += directoryInfo->TypeName.MaximumLength / sizeof(WCHAR);
directoryInfo->Name.Length = entry->Name.Length;
directoryInfo->Name.MaximumLength = entry->Name.MaximumLength;
directoryInfo->Name.Buffer = ptr;
memcpy(ptr, entry->Name.Buffer, entry->Name.MaximumLength);
ptr += directoryInfo->Name.MaximumLength / sizeof(WCHAR);

directoryInfo->TypeName.Length = entry->TypeName.Length;
directoryInfo->TypeName.MaximumLength = entry->TypeName.MaximumLength;
directoryInfo->TypeName.Buffer = ptr;
memcpy(ptr, entry->TypeName.Buffer, entry->TypeName.MaximumLength);
ptr += directoryInfo->TypeName.MaximumLength / sizeof(WCHAR);

directoryInfo++;
directoryInfo++;
}

entry = List_Next(entry);
}
Expand All @@ -4365,9 +4368,12 @@ _FX NTSTATUS Ipc_NtQueryDirectoryObject(
// terminate listing with an empty entry
//

directoryInfo->Name.Length = directoryInfo->TypeName.Length = 0;
directoryInfo->Name.MaximumLength = directoryInfo->TypeName.MaximumLength = 0;
directoryInfo->Name.Buffer = directoryInfo->TypeName.Buffer = NULL;
if (directoryInfo) {

directoryInfo->Name.Length = directoryInfo->TypeName.Length = 0;
directoryInfo->Name.MaximumLength = directoryInfo->TypeName.MaximumLength = 0;
directoryInfo->Name.Buffer = directoryInfo->TypeName.Buffer = NULL;
}

//
// set return values
Expand Down

0 comments on commit 0e175ee

Please sign in to comment.