mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
hurd: Make dl-sysdep __sbrk check __vm_allocate call
The caller won't be able to progress, but better crash than use random addr.
This commit is contained in:
parent
cba62c231c
commit
b7a5fec8b0
@ -699,7 +699,8 @@ void *weak_function
|
||||
__sbrk (intptr_t increment)
|
||||
{
|
||||
vm_address_t addr;
|
||||
__vm_allocate (__mach_task_self (), &addr, increment, 1);
|
||||
if (__vm_allocate (__mach_task_self (), &addr, increment, 1))
|
||||
return NULL;
|
||||
return (void *) addr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user