mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Kernel: Fail gracefully due to OOM on HashTable set in sys$setgroups
This commit is contained in:
parent
a9cd8ca841
commit
e23d320bb9
Notes:
sideshowbarker
2024-07-17 20:12:17 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/e23d320bb96 Pull-request: https://github.com/SerenityOS/serenity/pull/12128 Reviewed-by: https://github.com/bgianfo ✅
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ ErrorOr<FlatPtr> Process::sys$setgroups(size_t count, Userspace<const gid_t*> us
|
|||
HashTable<gid_t> unique_extra_gids;
|
||||
for (auto& extra_gid : new_extra_gids) {
|
||||
if (extra_gid != gid())
|
||||
unique_extra_gids.set(extra_gid);
|
||||
TRY(unique_extra_gids.try_set(extra_gid));
|
||||
}
|
||||
|
||||
ProtectedDataMutationScope scope { *this };
|
||||
|
|
Loading…
Reference in a new issue