mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
Kernel: open() with a zero-length path should fail with EINVAL
This commit is contained in:
parent
0e80b7faa5
commit
11fd7aed2a
Notes:
sideshowbarker
2024-07-19 11:16:23 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/11fd7aed2a5
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…
Reference in a new issue