mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 05:08:56 +00:00
Kernel: open() with a zero-length path should fail with EINVAL
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user