]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_verto] scan-build: fix false-positive Argument with 'nonnull' attribute passed... 1390/head
authorAndrey Volk <andywolk@gmail.com>
Tue, 19 Oct 2021 00:03:55 +0000 (03:03 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 19 Oct 2021 17:51:56 +0000 (20:51 +0300)
src/mod/endpoints/mod_verto/mod_verto.c

index dba9d632080a6f7fe26915e70f4c563aea0023eb..06cb6c76526313666496921b728b25e7f279c591 100644 (file)
@@ -1050,7 +1050,7 @@ static switch_bool_t check_auth(jsock_t *jsock, cJSON *params, int *code, char *
                        }
 
 
-                       if (zstr(use_passwd) || strcmp(a1_hash ? a1_hash : passwd, use_passwd)) {
+                       if (!use_passwd || zstr(use_passwd) || strcmp(a1_hash ? a1_hash : passwd, use_passwd)) {
                                r = SWITCH_FALSE;
                                *code = CODE_AUTH_FAILED;
                                switch_snprintf(message, mlen, "Authentication Failure");