aboutsummaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-28 23:41:28 -0800
committerJunio C Hamano <gitster@pobox.com>2009-01-28 23:41:28 -0800
commit8561b522d756861a41c0c54dfa2f609c7063887a (patch)
tree1a4f54e998139a48edff314339c486779aefb31b /sha1_file.c
parent02322e1619dc537dc48650761f6c9bae883612a7 (diff)
parent915308b187bdaba9ad1c6c3dea7b2b4b200b4796 (diff)
downloadgit-8561b522d756861a41c0c54dfa2f609c7063887a.tar.gz
git-8561b522d756861a41c0c54dfa2f609c7063887a.tar.xz
Merge branch 'maint-1.6.0' into maint
* maint-1.6.0: avoid 31-bit truncation in write_loose_object
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 52d1ead15..ce5ea12c4 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;