Skip to content

Commit e23d320

Browse files
committed
Kernel: Fail gracefully due to OOM on HashTable set in sys$setgroups
1 parent a9cd8ca commit e23d320

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Kernel/Syscalls/setuid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ ErrorOr<FlatPtr> Process::sys$setgroups(size_t count, Userspace<const gid_t*> us
187187
HashTable<gid_t> unique_extra_gids;
188188
for (auto& extra_gid : new_extra_gids) {
189189
if (extra_gid != gid())
190-
unique_extra_gids.set(extra_gid);
190+
TRY(unique_extra_gids.try_set(extra_gid));
191191
}
192192

193193
ProtectedDataMutationScope scope { *this };

0 commit comments

Comments
 (0)