Specifically, when ftpc->wait_data_conn was true and
Curl_conn_connect(...) returned with serv_conned == false the code
called ftp_check_ctrl_on_data_wait and returned without setting
*completep.
Now set it to 0 at function start to avoid this happening again.
Reported in Joshua's sarif data
Closes #18650
if(!ftpc || !ftp)
return CURLE_FAILED_INIT;
+
+ *completep = 0; /* default to stay in the state */
+
/* if the second connection has been set up, try to connect it fully
* to the remote host. This may not complete at this time, for several
* reasons:
/* this is a EPSV connect failing, try PASV instead */
return ftp_epsv_disable(data, ftpc, conn);
}
- *completep = (int)complete;
return result;
}
}