summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-01-28 23:41:28 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-01-28 23:41:28 -0800
commit8561b522d756861a41c0c54dfa2f609c7063887a (patch)
tree1a4f54e998139a48edff314339c486779aefb31b
parentsend-pack: do not send unknown object name from ".have" to pack-objects (diff)
parentavoid 31-bit truncation in write_loose_object (diff)
downloadtgif-8561b522d756861a41c0c54dfa2f609c7063887a.tar.xz
Merge branch 'maint-1.6.0' into maint
* maint-1.6.0: avoid 31-bit truncation in write_loose_object
-rw-r--r--sha1_file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 52d1ead15b..ce5ea12c44 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2337,7 +2337,8 @@ static int create_tmpfile(char *buffer, size_t bufsiz, const char *filename)
static int write_loose_object(const unsigned char *sha1, char *hdr, int hdrlen,
void *buf, unsigned long len, time_t mtime)
{
- int fd, size, ret;
+ int fd, ret;
+ size_t size;
unsigned char *compressed;
z_stream stream;
char *filename;