mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 17:31:46 -05:00
ftp_sendquote: use PPSENDF, not FTPSENDF
The last remaining code piece that still used FTPSENDF now uses PPSENDF. In the problematic case, a PREQUOTE series was done on a re-used connection when Curl_pp_init() hadn't been called so it had messed up pointers. The init call is done properly from Curl_pp_sendf() so this change fixes this particular crash. Bug: http://curl.haxx.se/mail/lib-2013-03/0319.html Reported by: Sam Deane
This commit is contained in:
parent
048726a5a2
commit
ca62ac69bb
@ -162,8 +162,6 @@ static CURLcode ftp_dophase_done(struct connectdata *conn,
|
||||
bool connected);
|
||||
|
||||
/* easy-to-use macro: */
|
||||
#define FTPSENDF(x,y,z) if((result = Curl_ftpsendf(x,y,z)) != CURLE_OK) \
|
||||
return result
|
||||
#define PPSENDF(x,y,z) if((result = Curl_pp_sendf(x,y,z)) != CURLE_OK) \
|
||||
return result
|
||||
|
||||
@ -3523,7 +3521,7 @@ CURLcode ftp_sendquote(struct connectdata *conn, struct curl_slist *quote)
|
||||
acceptfail = TRUE;
|
||||
}
|
||||
|
||||
FTPSENDF(conn, "%s", cmd);
|
||||
PPSENDF(&conn->proto.ftpc.pp, "%s", cmd);
|
||||
|
||||
pp->response = Curl_tvnow(); /* timeout relative now */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user