mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +00:00
Kernel: Fix mix-up between MAP_STACK/MAP_ANONYMOUS in prot validation
This commit is contained in:
parent
e55ef70e5e
commit
123c37e1c0
1 changed files with 1 additions and 1 deletions
|
@ -194,7 +194,7 @@ void* Process::sys$mmap(Userspace<const Syscall::SC_mmap_params*> user_params)
|
||||||
if (map_fixed && map_randomized)
|
if (map_fixed && map_randomized)
|
||||||
return (void*)-EINVAL;
|
return (void*)-EINVAL;
|
||||||
|
|
||||||
if (!validate_mmap_prot(prot, map_anonymous, map_stack))
|
if (!validate_mmap_prot(prot, map_stack, map_anonymous))
|
||||||
return (void*)-EINVAL;
|
return (void*)-EINVAL;
|
||||||
|
|
||||||
if (map_stack && (!map_private || !map_anonymous))
|
if (map_stack && (!map_private || !map_anonymous))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue