loader: Malloc(0) should return NULL.
We really should not allocate anything with size 0.
This commit is contained in:
parent
1781ad707e
commit
41e2c61669
@ -55,6 +55,9 @@ Malloc(size_t bytes, const char *file, int line)
|
||||
{
|
||||
Guard *res;
|
||||
|
||||
if (bytes == 0)
|
||||
return (NULL);
|
||||
|
||||
#ifdef USEENDGUARD
|
||||
bytes += MALLOCALIGN + 1;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user