mirror of
https://github.com/curl/curl.git
synced 2026-07-24 11:27:17 +03:00
Fixed an infinite loop when given an invalid SFTP quote command.
This commit is contained in:
parent
a57098ea9b
commit
e9a460411f
5 changed files with 13 additions and 13 deletions
16
lib/ssh.c
16
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue