diff --git a/src/internal.c b/src/internal.c index ba1ff99467..292f5f5de9 100644 --- a/src/internal.c +++ b/src/internal.c @@ -38025,6 +38025,17 @@ static int AddPSKtoPreMasterSecret(WOLFSSL* ssl) word16 i; word16 j; + if (outSuites == NULL) { + WOLFSSL_MSG("refineSuites called with NULL outSuites"); + return; + } + + if (sslSuites == NULL || peerSuites == NULL) { + WOLFSSL_MSG("refineSuites called with NULL suite list"); + outSuites->suiteSz = 0; + return; + } + XMEMSET(suites, 0, sizeof(suites)); if (!useClientOrder) {