mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
base-hw: add explicit array-bounds check
This patch rules out out-of-bounds array accesses without inspecting the caller. It is not a bug fix but adds clarity.
This commit is contained in:
committed by
Christian Helmuth
parent
de764d8490
commit
beb8bf498c
@@ -422,6 +422,9 @@ class Hw::Page_table
|
||||
size_t const size, Page_flags const & flags,
|
||||
Allocator & alloc)
|
||||
{
|
||||
if (i > MAX_INDEX)
|
||||
return;
|
||||
|
||||
using Pt = Page_table_level_2;
|
||||
using Ptd = Page_table_descriptor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user