stop progress callbacks after curl_easy_perform returns
This prevents possible null dereferences in FTP transfers when the progress callback is touched during connection teardown. http://curl.haxx.se/mail/lib-2011-08/0128.html Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
c4112da8c3
commit
edd9ed6a3b
|
@ -302,6 +302,9 @@ static int curl_download_internal(struct dload_payload *payload,
|
|||
/* perform transfer */
|
||||
handle->curlerr = curl_easy_perform(handle->curl);
|
||||
|
||||
/* immediately unhook the progress callback */
|
||||
curl_easy_setopt(handle->curl, CURLOPT_NOPROGRESS, 1L);
|
||||
|
||||
/* was it a success? */
|
||||
if(handle->curlerr == CURLE_ABORTED_BY_CALLBACK) {
|
||||
goto cleanup;
|
||||
|
|
Loading…
Reference in New Issue