mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 23:41:26 +12:00
ux/core: Add module verification step for some critical libraries
- Prevents running the emu with downloaded dll files
This commit is contained in:
parent
14a388b3fe
commit
ca0ca2e5a8
5 changed files with 110 additions and 2 deletions
|
@ -30,9 +30,10 @@
|
|||
#include "Utilities/sema.h"
|
||||
#include "Crypto/decrypt_binaries.h"
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include "module_verifier.hpp"
|
||||
#include "util/dyn_lib.hpp"
|
||||
|
||||
|
||||
// TODO(cjj19970505@live.cn)
|
||||
// When compiling with WIN32_LEAN_AND_MEAN definition
|
||||
// NTSTATUS is defined in CMake build but not in VS build
|
||||
|
@ -410,6 +411,13 @@ void fmt_class_string<std::chrono::sys_time<typename std::chrono::system_clock::
|
|||
out += ss.str();
|
||||
}
|
||||
|
||||
void run_platform_sanity_checks()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
// Check if we loaded modules correctly
|
||||
WIN32_module_verifier::run();
|
||||
#endif
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
@ -439,6 +447,9 @@ int main(int argc, char** argv)
|
|||
report_fatal_error(error);
|
||||
}
|
||||
|
||||
// Before we proceed, run some sanity checks
|
||||
run_platform_sanity_checks();
|
||||
|
||||
const std::string lock_name = fs::get_cache_dir() + "RPCS3.buf";
|
||||
|
||||
static fs::file instance_lock;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue