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

This commit is contained in:
Bananymous 2023-01-13 15:02:28 +02:00
parent 32453daf66
commit bf4b26d1fd
1 changed files with 1 additions and 1 deletions

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)