From dce3faff086f5cca1cd41225e27983d8f2ec89ba Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sun, 3 May 2020 14:47:15 +0200 Subject: [PATCH] Kernel: Don't crash on invalid fcntl --- Kernel/Process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 97456e180ce..616fdff75e5 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -1865,7 +1865,7 @@ int Process::sys$fcntl(int fd, int cmd, u32 arg) description->set_file_flags(arg); break; default: - ASSERT_NOT_REACHED(); + return -EINVAL; } return 0; }