mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:37:34 +00:00
Kernel: Harden LocalSocket Vector usage against OOM.
This commit is contained in:
parent
a9f488c55b
commit
e8d6d478c4
1 changed files with 2 additions and 1 deletions
|
@ -466,7 +466,8 @@ KResult LocalSocket::sendfd(const FileDescription& socket_description, FileDescr
|
||||||
// FIXME: Figure out how we should limit this properly.
|
// FIXME: Figure out how we should limit this properly.
|
||||||
if (queue.size() > 128)
|
if (queue.size() > 128)
|
||||||
return EBUSY;
|
return EBUSY;
|
||||||
queue.append(move(passing_description));
|
if (!queue.try_append(move(passing_description)))
|
||||||
|
return ENOMEM;
|
||||||
return KSuccess;
|
return KSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue