From dcde00a1ebac4ea366d983e722cb6b333952b803 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Fri, 3 Apr 2026 09:57:35 +0200 Subject: [PATCH] Add NULL parameter validation to wc_CryptKey F-1372 --- wolfcrypt/src/wc_encrypt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wolfcrypt/src/wc_encrypt.c b/wolfcrypt/src/wc_encrypt.c index 52505adefc..9c80ee1da4 100644 --- a/wolfcrypt/src/wc_encrypt.c +++ b/wolfcrypt/src/wc_encrypt.c @@ -338,6 +338,9 @@ int wc_CryptKey(const char* password, int passwordSz, const byte* salt, WOLFSSL_ENTER("wc_CryptKey"); + if (password == NULL || salt == NULL || input == NULL) + return BAD_FUNC_ARG; + if (length < 0) return BAD_LENGTH_E;