kern: add new overflow checks on KMemoryRegions
This commit is contained in:
@@ -207,6 +207,7 @@ namespace ams::kern {
|
||||
Result KThread::InitializeThread(KThread *thread, KThreadFunction func, uintptr_t arg, KProcessAddress user_stack_top, s32 prio, s32 core, KProcess *owner, ThreadType type) {
|
||||
/* Get stack region for the thread. */
|
||||
const auto &stack_region = KMemoryLayout::GetKernelStackRegion();
|
||||
MESOSPHERE_ABORT_UNLESS(stack_region.GetEndAddress() != 0);
|
||||
|
||||
/* Allocate a page to use as the thread. */
|
||||
KPageBuffer *page = KPageBuffer::Allocate();
|
||||
|
||||
Reference in New Issue
Block a user