Skip to content

Commit 5f22014

Browse files
committed
Fix from review
1 parent 2df57b7 commit 5f22014

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14774,7 +14774,7 @@ static int TLSX_GetSize(TLSX* list, byte* semaphore, byte msgType,
1477414774
* is added back into the word32 total.
1477514775
*
1477614776
* MAINTAINER NOTE: do NOT pass &length to any *_GET_SIZE function
14777-
* that expects a `word16*` out-parameter that would be a type
14777+
* that expects a `word16*` out-parameter -- that would be a type
1477814778
* mismatch (UB) and would silently bypass the overflow detection
1477914779
* below. When adding a new extension case, either:
1478014780
* - use `length += FOO_GET_SIZE(...)` when the helper returns a

tests/api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10536,7 +10536,7 @@ static int test_tls_ext_word16_overflow(void)
1053610536
* total extensions length in TLSX_GetRequestSize is exactly
1053710537
* WOLFSSL_MAX_16BIT - OPAQUE16_LEN (0xFFFD) *before* the OPAQUE16_LEN
1053810538
* block-prefix adjustment, which must succeed. This pins the `>`
10539-
* comparison in the overflow check mutating it to `>=` would
10539+
* comparison in the overflow check -- mutating it to `>=` would
1054010540
* incorrectly reject this valid case and fail this test. */
1054110541
{
1054210542
WOLFSSL_CTX* ctx2 = NULL;

0 commit comments

Comments
 (0)