mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 11:36:10 +00:00
LibTLS: Fix TLS breakage after ByteBuffer => Span conversion
Oops, I accidentally shadowed the outer scope's "decrypted" ByteBuffer which caused us to throw away the buffer too early. Fixes #4533.
This commit is contained in:
parent
bdff88d8d5
commit
3be9a9ac76
Notes:
sideshowbarker
2024-07-19 00:34:50 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3be9a9ac763
1 changed files with 2 additions and 2 deletions
|
@ -343,7 +343,7 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
|
|||
ASSERT(m_aes_remote.cbc);
|
||||
auto iv_size = iv_length();
|
||||
|
||||
auto decrypted = m_aes_remote.cbc->create_aligned_buffer(length - iv_size);
|
||||
decrypted = m_aes_remote.cbc->create_aligned_buffer(length - iv_size);
|
||||
auto iv = buffer.slice(header_size, iv_size);
|
||||
|
||||
Bytes decrypted_span = decrypted;
|
||||
|
@ -383,7 +383,7 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
|
|||
|
||||
return (i8)Error::IntegrityCheckFailed;
|
||||
}
|
||||
plain = decrypted.slice(0, length);
|
||||
plain = decrypted.bytes().slice(0, length);
|
||||
}
|
||||
}
|
||||
m_context.remote_sequence_number++;
|
||||
|
|
Loading…
Add table
Reference in a new issue