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 /Tests/LibTLS/TestTLSHandshake.cpp | |
parent | 3a9f00c59bad7735970c72cb940d08161fda09b0 (diff) | |
download | serenity-97e97bccab085823d1365cb54142fd8c41dbcd8c.zip |
Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe
Diffstat (limited to 'Tests/LibTLS/TestTLSHandshake.cpp')
-rw-r--r-- | Tests/LibTLS/TestTLSHandshake.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Tests/LibTLS/TestTLSHandshake.cpp b/Tests/LibTLS/TestTLSHandshake.cpp index 3f93cd587f..761098c8f9 100644 --- a/Tests/LibTLS/TestTLSHandshake.cpp +++ b/Tests/LibTLS/TestTLSHandshake.cpp @@ -18,7 +18,7 @@ constexpr const char* DEFAULT_SERVER { "www.google.com" }; static ByteBuffer operator""_b(const char* string, size_t length) { - return ByteBuffer::copy(string, length); + return ByteBuffer::copy(string, length).release_value(); } Vector<Certificate> load_certificates(); @@ -69,7 +69,7 @@ TEST_CASE(test_TLS_hello_handshake) RefPtr<TLS::TLSv12> tls = TLS::TLSv12::construct(nullptr); tls->set_root_certificates(s_root_ca_certificates); bool sent_request = false; - ByteBuffer contents = ByteBuffer::create_uninitialized(0); + ByteBuffer contents; tls->on_tls_ready_to_write = [&](TLS::TLSv12& tls) { if (sent_request) return; |