Skip to content

Commit 1ec1894

Browse files
committed
TLS 1.3 duplicate KeyShare entry fix
Fix comparison to be greater than or equal in case count is incremented after maxing out.
1 parent e78752f commit 1ec1894

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9830,7 +9830,7 @@ static int TLSX_KeyShareEntry_Parse(const WOLFSSL* ssl, const byte* input,
98309830
return BUFFER_ERROR;
98319831

98329832
if (seenGroups != NULL) {
9833-
if (*seenGroupsCnt == MAX_KEYSHARE_NAMED_GROUPS) {
9833+
if (*seenGroupsCnt >= MAX_KEYSHARE_NAMED_GROUPS) {
98349834
return BAD_KEY_SHARE_DATA;
98359835
}
98369836
for (i = 0; i < *seenGroupsCnt; i++) {

0 commit comments

Comments
 (0)