Skip to content

Commit 1706395

Browse files
defensive sanity check on password size passed in
1 parent cb6dd5a commit 1706395

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tools/clu_funcs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,7 @@ int wolfCLU_GetPassword(char* password, int* passwordSz, char* arg)
14771477
{
14781478
int ret = WOLFCLU_SUCCESS;
14791479

1480-
if (password == NULL || passwordSz == NULL) {
1480+
if (password == NULL || passwordSz == NULL || *passwordSz <= 0) {
14811481
return WOLFCLU_FATAL_ERROR;
14821482
}
14831483

0 commit comments

Comments
 (0)