mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
fixed some bugs
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@3791 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
@@ -428,8 +428,6 @@ ULONG PhpRebalanceAvlLinks(
|
||||
}
|
||||
else
|
||||
{
|
||||
PPH_AVL_LINKS Q;
|
||||
|
||||
Q = P->Right;
|
||||
|
||||
if (Q->Balance == 1)
|
||||
@@ -846,10 +844,13 @@ PPH_AVL_LINKS PhPredecessorElementAvlTree(
|
||||
links = links->Parent;
|
||||
}
|
||||
|
||||
// We need an additional check because the tree root is
|
||||
// stored in Root.Right, not Left.
|
||||
if (!links->Parent)
|
||||
return NULL; // reached Root, so no more elements
|
||||
if (links)
|
||||
{
|
||||
// We need an additional check because the tree root is
|
||||
// stored in Root.Right, not Left.
|
||||
if (!links->Parent)
|
||||
return NULL; // reached Root, so no more elements
|
||||
}
|
||||
|
||||
return links;
|
||||
}
|
||||
|
||||
@@ -1860,7 +1860,7 @@ NTSTATUS PhSetProcessDepStatusInvasive(
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(threadHandle = CreateRemoteThread(
|
||||
if (threadHandle = CreateRemoteThread(
|
||||
ProcessHandle,
|
||||
NULL,
|
||||
0,
|
||||
@@ -1868,7 +1868,11 @@ NTSTATUS PhSetProcessDepStatusInvasive(
|
||||
(PVOID)flags,
|
||||
0,
|
||||
NULL
|
||||
)))
|
||||
))
|
||||
{
|
||||
status = STATUS_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
status = NTSTATUS_FROM_WIN32(GetLastError());
|
||||
}
|
||||
|
||||
@@ -3620,6 +3620,8 @@ VOID PhUpdateHash(
|
||||
case Crc32HashAlgorithm:
|
||||
Context->Context[0] = ph_crc32(Context->Context[0], (PUCHAR)Buffer, Length);
|
||||
break;
|
||||
default:
|
||||
PhRaiseStatus(STATUS_INVALID_PARAMETER);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3668,6 +3670,8 @@ BOOLEAN PhFinalHash(
|
||||
returnLength = 4;
|
||||
|
||||
break;
|
||||
default:
|
||||
PhRaiseStatus(STATUS_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
if (ReturnLength)
|
||||
|
||||
Reference in New Issue
Block a user