diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-10-14 13:40:53 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-14 13:40:53 -0700 |
| commit | 55282f50ac8ad2253a8e96c4d5a7c5613fb2ad78 (patch) | |
| tree | 3f3c21827fc217710555ed95c765c3952d5b17d9 /http-push.c | |
| parent | Merge branch 'jt/clang-format-foreach-wo-space-before-parenthesis' into maint... (diff) | |
| parent | http-push: avoid new compile error (diff) | |
| download | git-55282f50ac8ad2253a8e96c4d5a7c5613fb2ad78.tar.gz git-55282f50ac8ad2253a8e96c4d5a7c5613fb2ad78.zip | |
Merge branch 'js/curl-off-t-fixes' into maint-2.51
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 91a5465afb..7a9b96a6d0 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); |
