Skip to content

Commit 75b0808

Browse files
committed
Update from review
1 parent 41ebc92 commit 75b0808

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5728,7 +5728,7 @@ int wolfSSL_export_keying_material(WOLFSSL *ssl,
57285728

57295729
/* Sanity check contextLen to prevent integer overflow when cast to word32
57305730
* and to ensure it fits in the 2-byte length encoding (max 65535). */
5731-
if (use_context && contextLen > 0xFFFF) {
5731+
if (use_context && contextLen > WOLFSSL_MAX_16BIT) {
57325732
WOLFSSL_MSG("contextLen too large");
57335733
return WOLFSSL_FAILURE;
57345734
}

src/tls13.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ int Tls13_Exporter(WOLFSSL* ssl, unsigned char *out, size_t outLen,
10241024
return ret;
10251025

10261026
/* Sanity check contextLen to prevent truncation when cast to word32. */
1027-
if (contextLen > 0xFFFFFFFFU) {
1027+
if (contextLen > WOLFSSL_MAX_32BIT) {
10281028
return BAD_FUNC_ARG;
10291029
}
10301030

0 commit comments

Comments
 (0)