mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-28 12:30:17 +00:00
kern: add missing debug mode check to WriteDebugProcessMemory
This commit is contained in:
parent
30fac905af
commit
275da52305
1 changed files with 3 additions and 0 deletions
|
@ -277,6 +277,9 @@ namespace ams::kern::svc {
|
||||||
}
|
}
|
||||||
|
|
||||||
Result WriteDebugProcessMemory(ams::svc::Handle debug_handle, uintptr_t buffer, uintptr_t address, size_t size) {
|
Result WriteDebugProcessMemory(ams::svc::Handle debug_handle, uintptr_t buffer, uintptr_t address, size_t size) {
|
||||||
|
/* Only allow invoking the svc on development hardware. */
|
||||||
|
R_UNLESS(KTargetSystem::IsDebugMode(), svc::ResultNotImplemented());
|
||||||
|
|
||||||
/* Validate address / size. */
|
/* Validate address / size. */
|
||||||
R_UNLESS(size > 0, svc::ResultInvalidSize());
|
R_UNLESS(size > 0, svc::ResultInvalidSize());
|
||||||
R_UNLESS((address < address + size), svc::ResultInvalidCurrentMemory());
|
R_UNLESS((address < address + size), svc::ResultInvalidCurrentMemory());
|
||||||
|
|
Loading…
Reference in a new issue