diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs index d65a373dd1..4718d412b0 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs @@ -845,6 +845,11 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall KProcess process = KernelStatic.GetCurrentProcess(); + if (!process.MemoryManager.InsideAddrSpace(position, size)) + { + return KernelResult.InvalidMemState; + } + KernelResult result = process.MemoryManager.SetMemoryAttribute( position, size,