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:
wj32
2010-10-24 04:10:33 +00:00
parent e2a107906c
commit c87f6ddc2e
3 changed files with 17 additions and 8 deletions
+7 -6
View File
@@ -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;
}
+6 -2
View File
@@ -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());
}
+4
View File
@@ -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)