diff --git a/Kernel/Syscalls/select.cpp b/Kernel/Syscalls/select.cpp index 2b46802e8a..f906545932 100644 --- a/Kernel/Syscalls/select.cpp +++ b/Kernel/Syscalls/select.cpp @@ -147,6 +147,10 @@ int Process::sys$poll(Userspace user_params) if (!copy_from_user(¶ms, user_params)) return -EFAULT; + // This limit is just a number from the place where numbers come from. + if (params.nfds >= 16384) + return -ENOBUFS; + Thread::BlockTimeout timeout; if (params.timeout) { timespec timeout_copy;