summaryrefslogtreecommitdiff
path: root/lib/vssh/libssh2.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-02-08 16:21:31 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-02-08 22:44:37 +0100
commit0c51036eb6ddef50a1730bdd33a4388b35343125 (patch)
treefd8d67514c053d64acd9d1948450129c9ef1e9fe /lib/vssh/libssh2.c
parentd836d362ec4c1d467ef5df370ae2573cbd1bfd2b (diff)
downloadcurl-0c51036eb6ddef50a1730bdd33a4388b35343125.tar.gz
ftp: never set data->set.ftp_append outside setopt
Since the set value then risks getting used like that when the easy handle is reused by the application. Also: renamed the struct field from 'ftp_append' to 'remote_append' since it is also used for SSH protocols. Closes #6579
Diffstat (limited to 'lib/vssh/libssh2.c')
-rw-r--r--lib/vssh/libssh2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c
index 3130dcc74..dbbeb2322 100644
--- a/lib/vssh/libssh2.c
+++ b/lib/vssh/libssh2.c
@@ -1880,7 +1880,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
}
}
- if(data->set.ftp_append)
+ if(data->set.remote_append)
/* Try to open for append, but create if nonexisting */
flags = LIBSSH2_FXF_WRITE|LIBSSH2_FXF_CREAT|LIBSSH2_FXF_APPEND;
else if(data->state.resume_from > 0)