mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 12:00:49 +02:00
Replace macros from stdint.h with literals to make code more generic
This commit is contained in:
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user