mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-18 17:14:28 -04:00
kern: add version bounds checking
This commit is contained in:
parent
56ec55f3c4
commit
47f2e93a42
5 changed files with 79 additions and 4 deletions
|
@ -146,8 +146,11 @@ namespace ams::kern {
|
|||
}
|
||||
|
||||
Result KProcess::Initialize(const ams::svc::CreateProcessParameter ¶ms) {
|
||||
/* TODO: Validate intended kernel version. */
|
||||
/* How should we do this? */
|
||||
/* Validate that the intended kernel version is high enough for us to support. */
|
||||
R_UNLESS(this->capabilities.GetIntendedKernelVersion() >= ams::svc::RequiredKernelVersion, svc::ResultInvalidCombination());
|
||||
|
||||
/* Validate that the intended kernel version isn't too high for us to support. */
|
||||
R_UNLESS(this->capabilities.GetIntendedKernelVersion() <= ams::svc::SupportedKernelVersion, svc::ResultInvalidCombination());
|
||||
|
||||
/* Create and clear the process local region. */
|
||||
R_TRY(this->CreateThreadLocalRegion(std::addressof(this->plr_address)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue