diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2008-03-18 22:59:04 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2008-03-18 22:59:04 +0000 |
commit | e9a460411fcbf28c9e8b4e6afba4a7d1efa8bde2 (patch) | |
tree | ca5c89dab66cd25e44a00d469573cf86e925c34e /lib | |
parent | a57098ea9b6148b900300b6dd385a3a7533bd656 (diff) | |
download | curl-e9a460411fcbf28c9e8b4e6afba4a7d1efa8bde2.tar.gz |
Fixed an infinite loop when given an invalid SFTP quote command.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssh.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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) { |