Kernel: kmalloc now returns nullptr if you try to allocate over kmalloc size

This commit is contained in:
2023-01-13 15:04:06 +02:00
parent 32453daf66
commit bf4b26d1fd
+1 -1
View File
@@ -98,7 +98,7 @@ void* kmalloc(size_t size)
void* kmalloc(size_t size, size_t align)
{
if (size == 0)
if (size == 0 || size >= s_kmalloc_size)
return nullptr;
if (align == 0)