Skip to content

Commit dcde00a

Browse files
committed
Add NULL parameter validation to wc_CryptKey F-1372
1 parent d6d439c commit dcde00a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

wolfcrypt/src/wc_encrypt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ int wc_CryptKey(const char* password, int passwordSz, const byte* salt,
338338

339339
WOLFSSL_ENTER("wc_CryptKey");
340340

341+
if (password == NULL || salt == NULL || input == NULL)
342+
return BAD_FUNC_ARG;
343+
341344
if (length < 0)
342345
return BAD_LENGTH_E;
343346

0 commit comments

Comments
 (0)