diff options
author | Max Dymond <cmeister2@gmail.com> | 2017-10-25 22:51:50 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-10-26 13:34:45 +0200 |
commit | 7b11c5dbe612e152e4ee1b61bac872a7e7958578 (patch) | |
tree | e743789e0ef205655750cb15626db59545ddd29b /lib/ftp.c | |
parent | 3340b456a544519531f8d42ec77d33251b765efa (diff) | |
download | curl-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.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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) { |