From bc50b629eeb9db5244090457630bc88f8772edde Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Tue, 29 Aug 2023 12:39:04 +0100 Subject: [PATCH] find: Don't allow negative GIDs to be passed to the `-group` option --- Userland/Utilities/find.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Utilities/find.cpp b/Userland/Utilities/find.cpp index d1e4a2094c..cc2c5dc420 100644 --- a/Userland/Utilities/find.cpp +++ b/Userland/Utilities/find.cpp @@ -205,7 +205,7 @@ public: m_gid = gr->gr_gid; } else { // Attempt to parse it as decimal GID. - auto number = StringView { arg, strlen(arg) }.to_int(); + auto number = StringView { arg, strlen(arg) }.to_uint(); if (!number.has_value()) fatal_error("Invalid group: \033[1m{}", arg); m_gid = number.value();