diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2009-11-11 20:42:41 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-13 14:40:05 -0800 |
commit | 4a5328d644b67be7fae1ff360e142d5dee4e63e9 (patch) | |
tree | e975ef19ce33153b165a5e0e9a41612f3443f82f /builtin-ls-remote.c | |
parent | t5551-http-fetch: Work around broken Accept header in libcurl (diff) | |
download | tgif-4a5328d644b67be7fae1ff360e142d5dee4e63e9.tar.xz |
http-backend: Fix bad treatment of uintmax_t in Content-Length
Our Content-Length needs to report an off_t, which could be larger
precision than size_t on this system (e.g. 32 bit binary built with
64 bit large file support).
We also shouldn't be passing a size_t parameter to printf when
we've used PRIuMAX as the format specifier.
Fix both issues by using uintmax_t for the hdr_int() routine,
allowing strbuf's size_t to automatically upcast, and off_t to
always fit.
Also fixed the copy loop we use inside of send_local_file(), we never
actually updated the size variable so we might as well not use it.
Reported-by: Tarmigan <tarmigan+git@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-ls-remote.c')
0 files changed, 0 insertions, 0 deletions