diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-06-16 16:44:15 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-16 21:29:36 +0200 |
commit | bc3076f8944e5a4f72b15e4e13c16b2c3e2f2080 (patch) | |
tree | 95219ba7fb9555dae2876041cc2e30a28556e057 /Kernel/Syscalls/getrandom.cpp | |
parent | ca3cae81eb8e20d63e36e7359a776af5eb4d5ea2 (diff) | |
download | serenity-bc3076f8944e5a4f72b15e4e13c16b2c3e2f2080.zip |
Kernel: Remove various other uses of ssize_t
Diffstat (limited to 'Kernel/Syscalls/getrandom.cpp')
-rw-r--r-- | Kernel/Syscalls/getrandom.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/getrandom.cpp b/Kernel/Syscalls/getrandom.cpp index 8000b25ef2..c92cc5778e 100644 --- a/Kernel/Syscalls/getrandom.cpp +++ b/Kernel/Syscalls/getrandom.cpp @@ -16,7 +16,7 @@ namespace Kernel { KResultOr<size_t> Process::sys$getrandom(Userspace<void*> buffer, size_t buffer_size, [[maybe_unused]] unsigned flags) { REQUIRE_PROMISE(stdio); - if (buffer_size <= 0) + if (buffer_size > NumericLimits<ssize_t>::max()) return EINVAL; auto data_buffer = UserOrKernelBuffer::for_user_buffer(buffer, buffer_size); |