aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-03-18 22:59:04 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-03-18 22:59:04 +0000
commite9a460411fcbf28c9e8b4e6afba4a7d1efa8bde2 (patch)
treeca5c89dab66cd25e44a00d469573cf86e925c34e /lib
parenta57098ea9b6148b900300b6dd385a3a7533bd656 (diff)
Fixed an infinite loop when given an invalid SFTP quote command.
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index f8b0f7643..b238e9c3b 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -956,14 +956,14 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
break;
}
- if(sshc->quote_path1) {
- Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
- }
- if(sshc->quote_path2) {
- Curl_safefree(sshc->quote_path2);
- sshc->quote_path2 = NULL;
- }
+ failf(data, "Unknown SFTP command");
+ Curl_safefree(sshc->quote_path1);
+ sshc->quote_path1 = NULL;
+ Curl_safefree(sshc->quote_path2);
+ sshc->quote_path2 = NULL;
+ state(conn, SSH_SFTP_CLOSE);
+ sshc->actualcode = CURLE_QUOTE_ERROR;
+ break;
}
}
if(!sshc->quote_item) {