Skip to content

Commit

Permalink
Merge pull request wolfSSL#8420 from douzzer/20250204-fix-null-ptr-in…
Browse files Browse the repository at this point in the history
…crements

20250204-fix-null-ptr-increments
  • Loading branch information
dgarske authored Feb 4, 2025
2 parents 6141b50 + b466bde commit 1d0855f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -27822,6 +27822,7 @@ static int ParseCipherList(Suites* suites,
}
if (currLen == 0)
break;
++next; /* increment to skip ':' */
}

#if defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL)
Expand Down Expand Up @@ -28173,8 +28174,7 @@ static int ParseCipherList(Suites* suites,
break;
}
}
}
while (next++); /* increment to skip ':' */
} while (next);

if (ret) {
int keySz = 0;
Expand Down
13 changes: 9 additions & 4 deletions src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -9221,8 +9221,14 @@ static int CheckcipherList(const char* list)

next = XSTRSTR(next, ":");

current_length = (!next) ? (word32)XSTRLEN(current)
: (word32)(next - current);
if (next) {
current_length = (word32)(next - current);
++next; /* increment to skip ':' */
}
else {
current_length = (word32)XSTRLEN(current);
}

if (current_length == 0) {
break;
}
Expand Down Expand Up @@ -9279,8 +9285,7 @@ static int CheckcipherList(const char* list)
/* list has mixed suites */
return 0;
}
}
while (next++); /* increment to skip ':' */
} while (next);

if (findTLSv13Suites == 0 && findbeforeSuites == 1) {
ret = 1;/* only before TLSv13 suites */
Expand Down

0 comments on commit 1d0855f

Please sign in to comment.