Skip to content

Commit

Permalink
IsWow64Process error handling update
Browse files Browse the repository at this point in the history
  • Loading branch information
lcferrum committed Jan 17, 2017
1 parent b03c990 commit 7690e4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FilePathRoutines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ bool FPRoutines::GetFP_PEB(HANDLE hProcess, std::wstring &fpath)
//Requires PROCESS_QUERY_(LIMITED_)INFORMATION
if (fnIsWow64Process) {
//If IsWow64Process is available and returns false - it's an actual error and we should fail
if (!fnIsWow64Process(hProcess, &pid_wow64)&&!fnIsWow64Process(GetCurrentProcess(), &cur_wow64))
if (!fnIsWow64Process(hProcess, &pid_wow64)||!fnIsWow64Process(GetCurrentProcess(), &cur_wow64))
return false;
}

Expand Down Expand Up @@ -835,7 +835,7 @@ std::vector<std::pair<std::wstring, std::wstring>> FPRoutines::GetModuleList(HAN
//Requires PROCESS_QUERY_(LIMITED_)INFORMATION
if (fnIsWow64Process) {
//If IsWow64Process is available and returns false - it's an actual error and we should fail
if (!fnIsWow64Process(hProcess, &pid_wow64)&&!fnIsWow64Process(GetCurrentProcess(), &cur_wow64))
if (!fnIsWow64Process(hProcess, &pid_wow64)||!fnIsWow64Process(GetCurrentProcess(), &cur_wow64))
return {};
}

Expand Down

0 comments on commit 7690e4b

Please sign in to comment.