mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-16 08:04:23 -04:00
kern: add new overflow checks on KMemoryRegions
This commit is contained in:
parent
748893fe77
commit
0a1465f198
8 changed files with 32 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue