diff --git a/2.x/trunk/phlib/collect.c b/2.x/trunk/phlib/collect.c index 2639bb7fb..86cf5b519 100644 --- a/2.x/trunk/phlib/collect.c +++ b/2.x/trunk/phlib/collect.c @@ -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; } diff --git a/2.x/trunk/phlib/native.c b/2.x/trunk/phlib/native.c index 110bc1fde..e77f44f75 100644 --- a/2.x/trunk/phlib/native.c +++ b/2.x/trunk/phlib/native.c @@ -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()); } diff --git a/2.x/trunk/phlib/support.c b/2.x/trunk/phlib/support.c index 6c3ad4113..3d0522e16 100644 --- a/2.x/trunk/phlib/support.c +++ b/2.x/trunk/phlib/support.c @@ -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)