Kernel: kmalloc now returns nullptr if you try to allocate over kmalloc size
This commit is contained in:
parent
32453daf66
commit
bf4b26d1fd
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue