Replace macros from stdint.h with literals to make code more generic

This commit is contained in:
Eric Blankenhorn
2026-02-24 08:02:26 -06:00
parent 4f8f11bcba
commit 41ebc92fa5
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -5728,7 +5728,7 @@ int wolfSSL_export_keying_material(WOLFSSL *ssl,
/* Sanity check contextLen to prevent integer overflow when cast to word32
* and to ensure it fits in the 2-byte length encoding (max 65535). */
if (use_context && contextLen > UINT16_MAX) {
if (use_context && contextLen > 0xFFFF) {
WOLFSSL_MSG("contextLen too large");
return WOLFSSL_FAILURE;
}
+1 -1
View File
@@ -1024,7 +1024,7 @@ int Tls13_Exporter(WOLFSSL* ssl, unsigned char *out, size_t outLen,
return ret;
/* Sanity check contextLen to prevent truncation when cast to word32. */
if (contextLen > UINT32_MAX) {
if (contextLen > 0xFFFFFFFFU) {
return BAD_FUNC_ARG;
}
+1 -1
View File
@@ -24074,7 +24074,7 @@ static int test_export_keying_material_cb(WOLFSSL_CTX *ctx, WOLFSSL *ssl)
* prevent integer overflow in seedLen calculation (ZD #21242). */
ExpectIntEQ(wolfSSL_export_keying_material(ssl, ekm, sizeof(ekm),
"Test label", XSTR_SIZEOF("Test label"), ekm,
(size_t)UINT16_MAX + 1, 1), 0);
(size_t)0xFFFF + 1, 1), 0);
return EXPECT_RESULT();
}