mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 20:54:41 +02:00
Confirm ssl->hsHashes is not NULL before attempting to dereference it.
This commit is contained in:
@@ -14341,7 +14341,7 @@ static int DoHandShakeMsgType(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
ssl->options.cacheMessages = 0;
|
ssl->options.cacheMessages = 0;
|
||||||
if (ssl->hsHashes->messages != NULL) {
|
if ((ssl->hsHashes != NULL) && (ssl->hsHashes->messages != NULL)) {
|
||||||
XFREE(ssl->hsHashes->messages, ssl->heap,
|
XFREE(ssl->hsHashes->messages, ssl->heap,
|
||||||
DYNAMIC_TYPE_HASHES);
|
DYNAMIC_TYPE_HASHES);
|
||||||
ssl->hsHashes->messages = NULL;
|
ssl->hsHashes->messages = NULL;
|
||||||
@@ -14427,7 +14427,7 @@ static int DoHandShakeMsgType(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
ssl->options.cacheMessages = 0;
|
ssl->options.cacheMessages = 0;
|
||||||
if (ssl->hsHashes->messages != NULL) {
|
if ((ssl->hsHashes != NULL) && (ssl->hsHashes->messages != NULL)) {
|
||||||
XFREE(ssl->hsHashes->messages, ssl->heap, DYNAMIC_TYPE_HASHES);
|
XFREE(ssl->hsHashes->messages, ssl->heap, DYNAMIC_TYPE_HASHES);
|
||||||
ssl->hsHashes->messages = NULL;
|
ssl->hsHashes->messages = NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user