Skip to content
Snippets Groups Projects
Commit 9b5b6a2b authored by Dan Fandrich's avatar Dan Fandrich
Browse files

ssh: prevent a logic error that could result in an infinite loop

parent ca7d1de6
No related branches found
No related tags found
No related merge requests found
......@@ -2204,7 +2204,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/* Check if nextstate is set and move .nextstate could be POSTQUOTE_INIT
After nextstate is executed,the control should come back to
SSH_SFTP_CLOSE to pass the correct result back */
if(sshc->nextstate != SSH_NO_STATE) {
if(sshc->nextstate != SSH_NO_STATE &&
sshc->nextstate != SSH_SFTP_CLOSE) {
state(conn, sshc->nextstate);
sshc->nextstate = SSH_SFTP_CLOSE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment