From bc3076f8944e5a4f72b15e4e13c16b2c3e2f2080 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 16 Jun 2021 16:44:15 +0200 Subject: Kernel: Remove various other uses of ssize_t --- Kernel/Syscalls/get_dir_entries.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Kernel/Syscalls/get_dir_entries.cpp') diff --git a/Kernel/Syscalls/get_dir_entries.cpp b/Kernel/Syscalls/get_dir_entries.cpp index 8219cfdecc..b449e88dcd 100644 --- a/Kernel/Syscalls/get_dir_entries.cpp +++ b/Kernel/Syscalls/get_dir_entries.cpp @@ -9,10 +9,10 @@ namespace Kernel { -KResultOr Process::sys$get_dir_entries(int fd, Userspace user_buffer, ssize_t user_size) +KResultOr Process::sys$get_dir_entries(int fd, Userspace user_buffer, size_t user_size) { REQUIRE_PROMISE(stdio); - if (user_size < 0) + if (user_size > NumericLimits::max()) return EINVAL; auto description = file_description(fd); if (!description) -- cgit v1.2.3