wolfcrypt/src/coding.c: fix incorrect array bounds check in CEscape(), introduced in 8bbe8a7c8a (before which there was no bounds check at all).

pull/8309/head
Daniel Pouzzner 2024-12-21 09:47:07 -06:00
parent 5ef4732745
commit b07f2cb461
1 changed files with 1 additions and 1 deletions

View File

@ -297,7 +297,7 @@ static int CEscape(int escaped, byte e, byte* out, word32* i, word32 maxSz,
if (raw)
basic = e;
else if (e <= sizeof(base64Encode))
else if (e < sizeof(base64Encode))
basic = base64Encode[e];
else
return BAD_FUNC_ARG;