From f7e5542dc13519cc78c204b4062acb0b71296a58 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 15 Jun 2025 15:42:39 +0200 Subject: fix: fix invalid bounds check in `DmaPool.h`'s `rtl_dma_alloc` Signed-off-by: Amlal El Mahrouss Signed-off-by: Amlal El Mahrouss --- dev/kernel/DmaKit/DmaPool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dev/kernel') diff --git a/dev/kernel/DmaKit/DmaPool.h b/dev/kernel/DmaKit/DmaPool.h index ca7c72c7..ada8299e 100644 --- a/dev/kernel/DmaKit/DmaPool.h +++ b/dev/kernel/DmaKit/DmaPool.h @@ -51,7 +51,7 @@ inline VoidPtr rtl_dma_alloc(SizeT size, SizeT align) { /// really. addr = (addr + (align - 1)) & ~(align - 1); - if ((addr + size) >= reinterpret_cast(kDmaPoolEnd)) { + if ((addr + size) > reinterpret_cast(kDmaPoolEnd)) { err_global_get() = kErrorDmaExhausted; return nullptr; } -- cgit v1.2.3