summaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorMax Dymond <cmeister2@gmail.com>2017-10-25 22:51:50 +0100
committerDaniel Stenberg <daniel@haxx.se>2017-10-26 13:34:45 +0200
commit7b11c5dbe612e152e4ee1b61bac872a7e7958578 (patch)
treee743789e0ef205655750cb15626db59545ddd29b /lib/ftp.c
parent3340b456a544519531f8d42ec77d33251b765efa (diff)
downloadcurl-7b11c5dbe612e152e4ee1b61bac872a7e7958578.tar.gz
wildcards: don't use with non-supported protocols
Fixes timeouts in the fuzzing tests for non-FTP protocols. Closes #2016
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index e9fab4f53..5c7df2b4c 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -182,7 +182,8 @@ const struct Curl_handler Curl_handler_ftp = {
PORT_FTP, /* defport */
CURLPROTO_FTP, /* protocol */
PROTOPT_DUAL | PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD |
- PROTOPT_NOURLQUERY | PROTOPT_PROXY_AS_HTTP /* flags */
+ PROTOPT_NOURLQUERY | PROTOPT_PROXY_AS_HTTP |
+ PROTOPT_WILDCARD /* flags */
};
@@ -210,7 +211,7 @@ const struct Curl_handler Curl_handler_ftps = {
PORT_FTPS, /* defport */
CURLPROTO_FTPS, /* protocol */
PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION |
- PROTOPT_NEEDSPWD | PROTOPT_NOURLQUERY /* flags */
+ PROTOPT_NEEDSPWD | PROTOPT_NOURLQUERY | PROTOPT_WILDCARD /* flags */
};
#endif
@@ -3177,7 +3178,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
/* now store a copy of the directory we are in */
free(ftpc->prevpath);
- if(data->set.wildcardmatch) {
+ if(data->state.wildcardmatch) {
if(data->set.chunk_end && ftpc->file) {
data->set.chunk_end(data->wildcard.customptr);
}
@@ -3962,7 +3963,7 @@ static CURLcode ftp_do(struct connectdata *conn, bool *done)
*done = FALSE; /* default to false */
ftpc->wait_data_conn = FALSE; /* default to no such wait */
- if(conn->data->set.wildcardmatch) {
+ if(conn->data->state.wildcardmatch) {
result = wc_statemach(conn);
if(conn->data->wildcard.state == CURLWC_SKIP ||
conn->data->wildcard.state == CURLWC_DONE) {