Guard Base16_Encode output sizing against word32 wraparound

This commit is contained in:
aidan garske
2026-06-16 12:38:26 -07:00
parent 6c2ff8a5f1
commit 699744c8b6
+3
View File
@@ -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;