Skip to content

Commit 06a36d8

Browse files
embhornCopilot
andauthored
Update tests/api/test_tls_ext.c
Explain reason for cast in test comments Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 0582aa2 commit 06a36d8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/api/test_tls_ext.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,8 @@ static word16 test_SNI_GetSize_old(SNI* list)
592592
length += ENUM_LEN + OPAQUE16_LEN;
593593
switch (sni->type) {
594594
case WOLFSSL_SNI_HOST_NAME:
595+
/* Intentional truncation to word16 to mirror the original
596+
* vulnerable implementation for testing overflow behavior. */
595597
length += (word16)XSTRLEN((char*)sni->data.host_name);
596598
break;
597599
}

0 commit comments

Comments
 (0)