Skip to content

Commit 3c72ada

Browse files
authored
Merge pull request #10711 from kareem-wolfssl/zd21987
Add a NULL check to refineSuites.
2 parents 460b7ad + e971d19 commit 3c72ada

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/internal.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38173,6 +38173,17 @@ static int AddPSKtoPreMasterSecret(WOLFSSL* ssl)
3817338173
word16 i;
3817438174
word16 j;
3817538175

38176+
if (outSuites == NULL) {
38177+
WOLFSSL_MSG("refineSuites called with NULL outSuites");
38178+
return;
38179+
}
38180+
38181+
if (sslSuites == NULL || peerSuites == NULL) {
38182+
WOLFSSL_MSG("refineSuites called with NULL suite list");
38183+
outSuites->suiteSz = 0;
38184+
return;
38185+
}
38186+
3817638187
XMEMSET(suites, 0, sizeof(suites));
3817738188

3817838189
if (!useClientOrder) {

0 commit comments

Comments
 (0)