commit | 915308b187bdaba9ad1c6c3dea7b2b4b200b4796 | [log] [tgz] |
---|---|---|
author | Jeff King <peff@peff.net> | Thu Jan 29 00:56:34 2009 -0500 |
committer | Junio C Hamano <gitster@pobox.com> | Wed Jan 28 23:40:53 2009 -0800 |
tree | c04697728ff54f8ee2fa8fdcdd4d92b258c7df20 | |
parent | b8469ad0578d6b84ec92752a5f8df3ca5828af77 [diff] |
avoid 31-bit truncation in write_loose_object The size of the content we are adding may be larger than 2.1G (i.e., "git add gigantic-file"). Most of the code-path to do so uses size_t or unsigned long to record the size, but write_loose_object uses a signed int. On platforms where "int" is 32-bits (which includes x86_64 Linux platforms), we end up passing malloc a negative size. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>