kern: fix svc bounds checking for main memory size 4GB -> 8GB (closes #1320)

This commit is contained in:
Michael Scire
2021-01-07 03:43:09 -08:00
parent b21f8a5043
commit 1c9d6b4d90
3 changed files with 6 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ namespace ams::kern::svc {
Result SetHeapSize(uintptr_t *out_address, size_t size) {
/* Validate size. */
R_UNLESS(util::IsAligned(size, ams::svc::HeapSizeAlignment), svc::ResultInvalidSize());
R_UNLESS(size < ams::kern::MainMemorySize, svc::ResultInvalidSize());
R_UNLESS(size < ams::kern::MainMemorySizeMax, svc::ResultInvalidSize());
/* Set the heap size. */
KProcessAddress address;