Skip to content

Commit 1fbe632

Browse files
Add a NULL check to refineSuites.
Thanks to xiaoshuai for the report.
1 parent c685293 commit 1fbe632

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/internal.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38025,6 +38025,12 @@ static int AddPSKtoPreMasterSecret(WOLFSSL* ssl)
3802538025
word16 i;
3802638026
word16 j;
3802738027

38028+
if (sslSuites == NULL || peerSuites == NULL) {
38029+
if (outSuites != NULL)
38030+
outSuites->suiteSz = 0;
38031+
return;
38032+
}
38033+
3802838034
XMEMSET(suites, 0, sizeof(suites));
3802938035

3803038036
if (!useClientOrder) {

0 commit comments

Comments
 (0)