forked from wolfSSL/wolfssl
Merge pull request #3956 from dgarske/zd12010
Fix in sniffer for possible use of uninitialized variable
This commit is contained in:
@@ -4865,7 +4865,8 @@ static int CheckPreRecord(IpInfo* ipInfo, TcpInfo* tcpInfo,
|
||||
|
||||
/* if current partial data, add to end of partial */
|
||||
/* if skipping, the data is already at the end of partial */
|
||||
if ( !skipPartial && (length = ssl->buffers.inputBuffer.length) ) {
|
||||
length = ssl->buffers.inputBuffer.length;
|
||||
if ( !skipPartial && length ) {
|
||||
Trace(PARTIAL_ADD_STR);
|
||||
|
||||
if ( (*sslBytes + length) > ssl->buffers.inputBuffer.bufferSize) {
|
||||
@@ -4882,10 +4883,9 @@ static int CheckPreRecord(IpInfo* ipInfo, TcpInfo* tcpInfo,
|
||||
*sslFrame = ssl->buffers.inputBuffer.buffer;
|
||||
*end = *sslFrame + *sslBytes;
|
||||
}
|
||||
}
|
||||
|
||||
if (vChain != NULL) {
|
||||
#ifdef WOLFSSL_SNIFFER_CHAIN_INPUT
|
||||
#ifdef WOLFSSL_SNIFFER_CHAIN_INPUT
|
||||
struct iovec* chain = (struct iovec*)vChain;
|
||||
word32 i, offset, headerSz, qty, remainder;
|
||||
|
||||
@@ -4920,9 +4920,10 @@ static int CheckPreRecord(IpInfo* ipInfo, TcpInfo* tcpInfo,
|
||||
ssl->buffers.inputBuffer.length = *sslBytes;
|
||||
*sslFrame = ssl->buffers.inputBuffer.buffer;
|
||||
*end = *sslFrame + *sslBytes;
|
||||
#endif
|
||||
#endif
|
||||
(void)chainSz;
|
||||
}
|
||||
}
|
||||
|
||||
if ((*session)->flags.clientHello == 0 && **sslFrame != handshake) {
|
||||
/* Sanity check the packet for an old style client hello. */
|
||||
|
Reference in New Issue
Block a user