mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibTLS: Remove unreachable buffer length check
Refer to the while condition
This commit is contained in:
parent
811d5a5c3e
commit
fa02d94d30
Notes:
github-actions[bot]
2024-12-22 11:34:48 +00:00
Author: https://github.com/shlyakpavel
Commit: fa02d94d30
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2984
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/gmta
1 changed files with 0 additions and 2 deletions
|
@ -257,8 +257,6 @@ ssize_t TLSv12::handle_handshake_payload(ReadonlyBytes vbuffer)
|
|||
auto original_length = buffer_length;
|
||||
while (buffer_length >= 4 && !m_context.critical_error) {
|
||||
ssize_t payload_res = 0;
|
||||
if (buffer_length < 1)
|
||||
return (i8)Error::NeedMoreData;
|
||||
auto type = static_cast<HandshakeType>(buffer[0]);
|
||||
auto write_packets { WritePacketStage::Initial };
|
||||
size_t payload_size = buffer[1] * 0x10000 + buffer[2] * 0x100 + buffer[3] + 3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue