kernel: Add missing address space check in SetMemoryAttribute syscall (#2771)

pull/2775/head
Mary 2021-10-24 01:07:41 +02:00 committed by GitHub
parent 0d174cbd45
commit e7e65ccbc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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,