mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'js/curl-off-t-fixes'
A few places where an size_t value was cast to curl_off_t without checking has been updated to use the existing helper function. * js/curl-off-t-fixes: http-push: avoid new compile error imap-send: be more careful when casting to `curl_off_t` http: offer to cast `size_t` to `curl_off_t` safely
This commit is contained in:
@@ -208,7 +208,8 @@ static void curl_setup_http(CURL *curl, const char *url,
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||
curl_easy_setopt(curl, CURLOPT_INFILE, buffer);
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE, buffer->buf.len);
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
|
||||
cast_size_t_to_curl_off_t(buffer->buf.len));
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, fread_buffer);
|
||||
curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, seek_buffer);
|
||||
curl_easy_setopt(curl, CURLOPT_SEEKDATA, buffer);
|
||||
|
||||
Reference in New Issue
Block a user