projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca7d1de
)
ssh: prevent a logic error that could result in an infinite loop
author
Dan Fandrich
<dan@coneharvesters.com>
Sat, 15 Mar 2014 08:57:41 +0000
(09:57 +0100)
committer
Dan Fandrich
<dan@coneharvesters.com>
Sat, 15 Mar 2014 09:26:29 +0000
(10:26 +0100)
lib/ssh.c
patch
|
blob
|
history
diff --git
a/lib/ssh.c
b/lib/ssh.c
index
5895a10
..
ad6d322
100644
(file)
--- a/
lib/ssh.c
+++ b/
lib/ssh.c
@@
-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;
}