An integer overflow exists in the `EVP EncodeBlock()` function, which is used to base64-encode a buffer into a caller-allocated output buffer. When the input length is close to `INT MAX` (approximately 2 GB), the arithmetic used to calculate the required encoded output size overflows a signed integer. This causes the function to write more data than the allocated buffer can hold, resulting in a heap buffer overflow. This can lead to memory corruption or application crashes. The issue is most likely to affect applications that accept an attacker-controlled length and pass it to `EVP EncodeBlock()` without performing their own bound checks. OpenSSL's internal TLS, QUIC, and CMS implementations are not affected as they do not encode buffers of this size.