From 9806a23f83ae7505e988a3cee9bd9111029f28a2 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 23 May 2019 17:02:58 +0200 Subject: [PATCH] Kernel: Return ENOSYS if an invalid syscall number is requested. --- Kernel/Syscall.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp index 338252f632..94b8ea6c97 100644 --- a/Kernel/Syscall.cpp +++ b/Kernel/Syscall.cpp @@ -278,7 +278,7 @@ static dword handle(RegisterDump& regs, dword function, dword arg1, dword arg2, return current->process().sys$getpeername((int)arg1, (sockaddr*)arg2, (socklen_t*)arg3); default: kprintf("<%u> int0x82: Unknown function %u requested {%x, %x, %x}\n", current->process().pid(), function, arg1, arg2, arg3); - break; + return -ENOSYS; } return 0; }