mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:28:12 +00:00
Kernel: open() with a zero-length path should fail with EINVAL
This commit is contained in:
parent
0e80b7faa5
commit
11fd7aed2a
1 changed files with 2 additions and 0 deletions
|
@ -1348,6 +1348,8 @@ int Process::sys$open(const Syscall::SC_open_params* params)
|
|||
if (!validate_read_typed(params))
|
||||
return -EFAULT;
|
||||
auto& [path, path_length, options, mode] = *params;
|
||||
if (!path_length)
|
||||
return -EINVAL;
|
||||
if (!validate_read(path, path_length))
|
||||
return -EFAULT;
|
||||
#ifdef DEBUG_IO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue