diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-10-07 12:25:27 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-07 12:25:27 -0700 |
| commit | c2817955674c8cfc217c4ffc1deea8cc8cabe526 (patch) | |
| tree | 6330f51d8f3535d6f4fad01ce2573a801e70c1d8 /http-push.c | |
| parent | Merge branch 'jt/clang-format-foreach-wo-space-before-parenthesis' (diff) | |
| parent | http-push: avoid new compile error (diff) | |
| download | git-c2817955674c8cfc217c4ffc1deea8cc8cabe526.tar.gz git-c2817955674c8cfc217c4ffc1deea8cc8cabe526.zip | |
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
Diffstat (limited to 'http-push.c')
| -rw-r--r-- | http-push.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/http-push.c b/http-push.c index 4c43ba3bc7..a1c01e3b9b 100644 --- a/http-push.c +++ b/http-push.c @@ -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); |
