curl-library
Re: So close,... buffer overrun crash on ftp upload
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 22 Nov 2004 08:40:20 +0100 (CET)
Date: Mon, 22 Nov 2004 08:40:20 +0100 (CET)
On Sun, 21 Nov 2004 joseph.tilley_at_atxinc.com wrote:
> //Callback function to read a file from disk for upload to a remote site.
I didn't spot the error, but it seems very inefficient to load the whole file
into an allocated buffer, and then memcpy() around that whole file when you
can just load a chunk each time this callback is called.
> curl_easy_setopt(m_pCurl, CURLOPT_FTP_USE_EPSV, bPassive);
Note that this option does not toggle passive/active mode, it only controls
weather EPSV is used or not in passive mode. libcurl defaults to passive.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-11-22