mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +00:00
find: Don't allow negative GIDs to be passed to the -group
option
This commit is contained in:
parent
6d7a2f5cc9
commit
bc50b629ee
1 changed files with 1 additions and 1 deletions
|
@ -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<gid_t>();
|
||||
if (!number.has_value())
|
||||
fatal_error("Invalid group: \033[1m{}", arg);
|
||||
m_gid = number.value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue