aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-08-19 15:49:54 -0700
committerJunio C Hamano <gitster@pobox.com>2010-08-19 15:49:54 -0700
commit745654f82a3ea02b15c59991d4461090a00b5645 (patch)
tree54b525b1e58debc2bc11fd6395064c43d3855ab9
parent6baa9bd882fe003478c42ee5709dcfc713e13ec9 (diff)
parent46be82dfd0850d7e96b1401a81a396e0cd0e0527 (diff)
downloadgit-745654f82a3ea02b15c59991d4461090a00b5645.tar.gz
git-745654f82a3ea02b15c59991d4461090a00b5645.tar.xz
Merge branch 'tr/xsize-bits' into maint
* tr/xsize-bits: xsize_t: check whether we lose bits
-rw-r--r--git-compat-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 02a73eeb6..fe845ae63 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -388,6 +388,8 @@ extern int odb_pack_keep(char *name, size_t namesz, unsigned char *sha1);
static inline size_t xsize_t(off_t len)
{
+ if (len > (size_t) len)
+ die("Cannot handle files this big");
return (size_t)len;
}