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;