From d960d02c80ca608b2d6f9504a6218b3d93c931b3 Mon Sep 17 00:00:00 2001 From: Ruby Martin Date: Wed, 6 May 2026 09:28:43 -0600 Subject: [PATCH] compare against MAX_UNICODE_SZ, readability change --- wolfcrypt/src/wc_encrypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/wc_encrypt.c b/wolfcrypt/src/wc_encrypt.c index 05f0ac8984..9e131dc768 100644 --- a/wolfcrypt/src/wc_encrypt.c +++ b/wolfcrypt/src/wc_encrypt.c @@ -468,8 +468,8 @@ int wc_CryptKey(const char* password, int passwordSz, const byte* salt, byte unicodePasswd[MAX_UNICODE_SZ]; if (passwordSz < 0 || - passwordSz >= (int)sizeof(unicodePasswd) || - (passwordSz * 2 + 2) > (int)sizeof(unicodePasswd)) { + passwordSz >= MAX_UNICODE_SZ || + (passwordSz * 2 + 2) > MAX_UNICODE_SZ) { ret = UNICODE_SIZE_E; break; }