From b07f2cb461e2de9e5fc7d79cc64eeef2464f2765 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Sat, 21 Dec 2024 09:47:07 -0600 Subject: [PATCH] wolfcrypt/src/coding.c: fix incorrect array bounds check in CEscape(), introduced in 8bbe8a7c8a (before which there was no bounds check at all). --- wolfcrypt/src/coding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/coding.c b/wolfcrypt/src/coding.c index 823799dd92..70717964cb 100644 --- a/wolfcrypt/src/coding.c +++ b/wolfcrypt/src/coding.c @@ -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;