fix bug in sniffer when using old client hellos where large hello message may

be ignored
This commit is contained in:
John Safranek 2014-11-07 17:11:38 -08:00
parent 54f678b9ee
commit eb59597fed
1 changed files with 1 additions and 1 deletions

View File

@ -2536,7 +2536,7 @@ static int CheckPreRecord(IpInfo* ipInfo, TcpInfo* tcpInfo,
if ((*session)->flags.clientHello == 0 && **sslFrame != handshake) {
/* Sanity check the packet for an old style client hello. */
int rhSize = ((*sslFrame)[0] & 0x7f) | ((*sslFrame)[1]);
int rhSize = (((*sslFrame)[0] & 0x7f) << 8) | ((*sslFrame)[1]);
if ((rhSize <= (*sslBytes - 2)) &&
(*sslFrame)[2] == OLD_HELLO_ID && (*sslFrame)[3] == SSLv3_MAJOR) {