mirror of
https://github.com/moparisthebest/curl
synced 2024-10-31 15:45:12 -04:00
ssh: prevent a logic error that could result in an infinite loop
This commit is contained in:
parent
ca7d1de69c
commit
9b5b6a2b1a
@ -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
|
/* Check if nextstate is set and move .nextstate could be POSTQUOTE_INIT
|
||||||
After nextstate is executed,the control should come back to
|
After nextstate is executed,the control should come back to
|
||||||
SSH_SFTP_CLOSE to pass the correct result back */
|
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);
|
state(conn, sshc->nextstate);
|
||||||
sshc->nextstate = SSH_SFTP_CLOSE;
|
sshc->nextstate = SSH_SFTP_CLOSE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user