Skip to content

Commit

Permalink
Fix: Bug reported by the clang static analyzer.
Browse files Browse the repository at this point in the history
Description: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc'
File: ./nasl/nasl_ssh.c
Line: 1067
  • Loading branch information
jjnicola committed Oct 21, 2022
1 parent c7b3e9d commit ef2340b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nasl/nasl_ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,8 @@ nasl_ssh_login_interactive (lex_ctxt *lexic)
{
/* Our strategy for kbint is to send the password to the first
prompt marked as non-echo. */
while ((rc = ssh_userauth_kbdint (session, NULL, NULL)) == SSH_AUTH_INFO)
rc = ssh_userauth_kbdint (session, NULL, NULL);
while (rc == SSH_AUTH_INFO)
{
int n, nprompt;
char echoflag;
Expand All @@ -1090,6 +1091,7 @@ nasl_ssh_login_interactive (lex_ctxt *lexic)
if (s && *s && !echoflag && !found_prompt)
goto leave;
}
rc = ssh_userauth_kbdint (session, NULL, NULL);
}
if (verbose)
g_message (
Expand Down

0 comments on commit ef2340b

Please sign in to comment.