Fix OpenProcessToken pseudo-handle regression

This commit is contained in:
2025-10-05 18:16:15 -06:00
parent 0d76e541c1
commit ff04eb9f41
6 changed files with 31 additions and 25 deletions

View File

@@ -78,8 +78,7 @@ constexpr ULONG kOsPlatformId = 2; // VER_PLATFORM_WIN32_NT
constexpr BYTE kProductTypeWorkstation = 1; // VER_NT_WORKSTATION
bool resolveProcessDetails(HANDLE processHandle, ProcessHandleDetails &details) {
uintptr_t rawHandle = reinterpret_cast<uintptr_t>(processHandle);
if (rawHandle == static_cast<uintptr_t>(-1)) {
if (kernel32::isPseudoCurrentProcessHandle(processHandle)) {
details.pid = getpid();
details.exitCode = STILL_ACTIVE;
details.peb = wibo::processPeb;