Skip to content

Commit

Permalink
Fix oss-fuzz issue 64124
Browse files Browse the repository at this point in the history
  • Loading branch information
sashashura authored Nov 13, 2023
1 parent 641232e commit 9814366
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Packet++/src/SSLHandshake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ uint16_t SSLClientHelloMessage::getCipherSuiteID(int index, bool& isValid) const
}

size_t cipherSuiteStartOffset = sizeof(ssl_tls_client_server_hello) + sizeof(uint8_t) + getSessionIDLength() + sizeof(uint16_t);
if (cipherSuiteStartOffset + sizeof(uint16_t) > m_DataLen)
if (cipherSuiteStartOffset + sizeof(uint16_t) * (index + 1) > m_DataLen)
{
isValid = false;
return 0;
Expand Down

0 comments on commit 9814366

Please sign in to comment.