mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-29 22:42:40 +02:00
kern: add missing debug mode check to WriteDebugProcessMemory
This commit is contained in:
parent
9436b9a555
commit
ee45932d52
@ -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 New Issue
Block a user