Fix 32-bit process identifying 64-bit process.

This commit is contained in:
Jason Hood 2012-02-05 11:31:39 +10:00
parent b73334ae08
commit 4add6313e9

View File

@ -75,6 +75,15 @@ int ProcessType( LPPROCESS_INFORMATION pinfo, BOOL* gui )
}
}
}
#ifdef _WIN32
// If a 32-bit process manages to load a 64-bit one, we may miss the base
// address. If the pointer overflows, assume 64-bit and abort.
if (ptr > ptr + minfo.RegionSize)
{
DEBUGSTR( 1, L" Ignoring apparent 64-bit process." );
return 0;
}
#endif
}
DEBUGSTR( 1, L" Ignoring non-Windows process" );