Silence Coverity Scan's concern over password_cmd derefencing.
This is a false positive, the conditions to trigger a NULL derefence rely on argc changing value. However, this makes it impossible to go wrong anyway. Coverity Scan 1436868.
This commit is contained in:
parent
dac841a342
commit
0713ad38b1
@ -125,6 +125,10 @@ int output_new_password(FILE *fptr, const char *username, const char *password,
|
||||
char *salt64 = NULL, *hash64 = NULL;
|
||||
struct mosquitto_pw pw;
|
||||
|
||||
if(password == NULL){
|
||||
fprintf(stderr, "Error: Internal error, no password given.\n");
|
||||
return 1;
|
||||
}
|
||||
memset(&pw, 0, sizeof(pw));
|
||||
|
||||
pw.hashtype = hashtype;
|
||||
|
Loading…
Reference in New Issue
Block a user