mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
hurd: Do not allow unmapping address 0
* sysdeps/mach/munmap.c (__munmap): Return EINVAL if `addr' is 0.
This commit is contained in:
@@ -27,6 +27,13 @@ int
|
||||
__munmap (__ptr_t addr, size_t len)
|
||||
{
|
||||
kern_return_t err;
|
||||
|
||||
if (addr == 0)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (err = __vm_deallocate (__mach_task_self (),
|
||||
(vm_address_t) addr, (vm_size_t) len))
|
||||
{
|
||||
|
Reference in New Issue
Block a user