Skip to content

Commit

Permalink
wolfcrypt/src/coding.c: fix incorrect array bounds check in CEscape()…
Browse files Browse the repository at this point in the history
…, introduced in 8bbe8a7 (before which there was no bounds check at all).
  • Loading branch information
douzzer committed Dec 21, 2024
1 parent 5ef4732 commit b07f2cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wolfcrypt/src/coding.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b07f2cb

Please sign in to comment.