diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-09-06 03:29:52 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-06 01:53:26 +0200 |
commit | 97e97bccab085823d1365cb54142fd8c41dbcd8c (patch) | |
tree | 9008687dbcdfb6f36f6dc6372aa382b15b9d36c8 /Userland/Services/TelnetServer/Client.cpp | |
parent | 3a9f00c59bad7735970c72cb940d08161fda09b0 (diff) | |
download | serenity-97e97bccab085823d1365cb54142fd8c41dbcd8c.zip |
Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe
Diffstat (limited to 'Userland/Services/TelnetServer/Client.cpp')
-rw-r--r-- | Userland/Services/TelnetServer/Client.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Services/TelnetServer/Client.cpp b/Userland/Services/TelnetServer/Client.cpp index af496c0a4f..a1a23d3e4d 100644 --- a/Userland/Services/TelnetServer/Client.cpp +++ b/Userland/Services/TelnetServer/Client.cpp @@ -150,7 +150,7 @@ void Client::send_command(Command command) void Client::send_commands(Vector<Command> commands) { - auto buffer = ByteBuffer::create_uninitialized(commands.size() * 3); + auto buffer = ByteBuffer::create_uninitialized(commands.size() * 3).release_value(); // FIXME: Handle possible OOM situation. OutputMemoryStream stream { buffer }; for (auto& command : commands) |