From ed325b4a4563c5b433b24b2e623a828218d173e6 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Fri, 9 Aug 2024 16:52:57 +0300 Subject: [PATCH] Kernel: Fix typo in userspace address validation --- kernel/kernel/Process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/kernel/Process.cpp b/kernel/kernel/Process.cpp index 78120e6ba6..911750f31c 100644 --- a/kernel/kernel/Process.cpp +++ b/kernel/kernel/Process.cpp @@ -2278,7 +2278,7 @@ namespace Kernel // FIXME: should we allow cross mapping access? for (auto& mapped_region : m_mapped_regions) - mapped_region->contains_fully(vaddr, size); + if (mapped_region->contains_fully(vaddr, size)) return {}; // FIXME: elf should contain full range [vaddr, vaddr + size)