Kernel: Allow negative value for backlog in sys$listen

This commit is contained in:
Romain Chardiny 2023-11-04 15:42:15 +01:00 committed by Andreas Kling
parent a6fde58682
commit 6d31d81309
Notes: sideshowbarker 2024-07-17 02:57:43 +09:00

View file

@ -66,7 +66,7 @@ ErrorOr<FlatPtr> Process::sys$listen(int sockfd, int backlog)
{
VERIFY_NO_PROCESS_BIG_LOCK(this);
if (backlog < 0)
return EINVAL;
backlog = 0;
auto description = TRY(open_file_description(sockfd));
if (!description->is_socket())
return ENOTSOCK;