diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 35e1b81995a..54afa1eadd2 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -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