diff --git a/src/ssl.c b/src/ssl.c index 11665a27d4..2e35d8cfe1 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -15422,7 +15422,7 @@ int wolfSSL_BUF_MEM_grow_ex(WOLFSSL_BUF_MEM* buf, size_t len, /* verify provided arguments. The return value is an int holding the * resulting length, so reject any len that cannot be represented as a * non-negative int. This also prevents truncating size_t to int. */ - if (buf == NULL || len > (size_t)INT_MAX) { + if (buf == NULL || len > (size_t)WC_MAX_SINT_OF(int)) { return 0; /* BAD_FUNC_ARG; */ }