Improve continue message error checking
@@ -785,9 +785,14 @@ static BOOLEAN PhpShowContinueMessageProcesses(
for (i = 0; i < NumberOfProcesses; i++)
{
HANDLE processHandle;
- ULONG breakOnTermination;
+ ULONG breakOnTermination = 0;
- breakOnTermination = 0;
+ if (PhpIsDangerousProcess(Processes[i]->ProcessId))
+ {
+ critical = TRUE;
+ dangerous = TRUE;
+ break;
+ }
if (NT_SUCCESS(PhOpenProcess(&processHandle, PROCESS_QUERY_INFORMATION, Processes[i]->ProcessId)))
{
@@ -801,12 +806,6 @@ static BOOLEAN PhpShowContinueMessageProcesses(
dangerous = TRUE;
break;
}
-
- if (PhpIsDangerousProcess(Processes[i]->ProcessId))
- {
- dangerous = TRUE;
- break;
- }
}
if (WarnOnlyIfDangerous && !dangerous)
