Git fork

imap-send: be more careful when casting to `curl_off_t`

When casting a `size_t` to `curl_off_t`, there is a currently uncommon
chance that the value can be cut off (`curl_off_t` is expected to be a
signed 64-bit data type).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Johannes Schindelin and committed by
Junio C Hamano
580cf0f2 e4efcd70

+1 -1
+1 -1
imap-send.c
··· 1475 1475 lf_to_crlf(&msgbuf.buf); 1476 1476 1477 1477 curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, 1478 - (curl_off_t)(msgbuf.buf.len-prev_len)); 1478 + cast_size_t_to_curl_off_t(msgbuf.buf.len-prev_len)); 1479 1479 1480 1480 res = curl_easy_perform(curl); 1481 1481