diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2014-03-15 09:57:41 +0100 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2014-03-15 10:26:29 +0100 |
commit | 9b5b6a2b1a97b4c49e17b781068f14520f4359fd (patch) | |
tree | 141759071c09e85d09a11c9ccc316ac89091db11 | |
parent | ca7d1de69c73a6c19a1a5b7ee33a0b12c5e06d6a (diff) |
ssh: prevent a logic error that could result in an infinite loop
-rw-r--r-- | lib/ssh.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |