mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-08-23 20:53:23 +02:00
Guard Base16_Encode output sizing against word32 wraparound
This commit is contained in:
@@ -675,6 +675,9 @@ int Base16_Encode(const byte* in, word32 inLen, byte* out, word32* outLen)
|
||||
if (in == NULL || out == NULL || outLen == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
if (inLen > (WOLFSSL_MAX_32BIT / 2))
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
if (*outLen < (2 * inLen))
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user