Skip to content

Commit d4d6326

Browse files
committed
Fix crash when viewing handle properties with an unknown type
1 parent 06b114d commit d4d6326

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ProcessHacker/hndlprp.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,11 @@ VOID PhpUpdateHandleGeneralListViewGroups(
359359
NULL
360360
);
361361

362-
if (PhEqualString2(Context->HandleItem->TypeName, L"ALPC Port", TRUE))
362+
if (PhIsNullOrEmptyString(Context->HandleItem->TypeName))
363+
{
364+
NOTHING;
365+
}
366+
else if (PhEqualString2(Context->HandleItem->TypeName, L"ALPC Port", TRUE))
363367
{
364368
PhAddListViewGroup(Context->ListViewHandle, PH_HANDLE_GENERAL_CATEGORY_ALPC, L"ALPC Port");
365369
Context->ListViewRowCache[PH_HANDLE_GENERAL_INDEX_SEQUENCENUMBER] = PhAddListViewGroupItem(
@@ -582,7 +586,11 @@ VOID PhpUpdateHandleGeneral(
582586
NtClose(processHandle);
583587
}
584588

585-
if (PhEqualString2(Context->HandleItem->TypeName, L"ALPC Port", TRUE))
589+
if (PhIsNullOrEmptyString(Context->HandleItem->TypeName))
590+
{
591+
NOTHING;
592+
}
593+
else if (PhEqualString2(Context->HandleItem->TypeName, L"ALPC Port", TRUE))
586594
{
587595
NTSTATUS status;
588596
HANDLE processHandle;

0 commit comments

Comments
 (0)