[Emulator] Validate module is an executable before launching
This commit is contained in:
parent
d99d053408
commit
ae23222ba8
|
@ -1372,6 +1372,12 @@ X_STATUS Emulator::CompleteLaunch(const std::filesystem::path& path,
|
||||||
return X_STATUS_NOT_FOUND;
|
return X_STATUS_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!module->is_executable()) {
|
||||||
|
kernel_state_->UnloadUserModule(module, false);
|
||||||
|
XELOGE("Failed to load user module {}", path);
|
||||||
|
return X_STATUS_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
X_RESULT result = kernel_state_->ApplyTitleUpdate(module);
|
X_RESULT result = kernel_state_->ApplyTitleUpdate(module);
|
||||||
if (XFAILED(result)) {
|
if (XFAILED(result)) {
|
||||||
XELOGE("Failed to apply title update! Cannot run module {}", path);
|
XELOGE("Failed to apply title update! Cannot run module {}", path);
|
||||||
|
|
Loading…
Reference in New Issue