Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-08-18 23:14:23 +0400
committerJunio C Hamano <gitster@pobox.com>2010-08-18 23:14:23 +0400
commit7e00a9104bc8ce27f73132fbaa8f8528e26206a8 (patch)
treec691d01d180f63c632dd08a4569f9cf4d616ec2f
parent07cd900112b19657531a1f5c2a15e639d98fbd18 (diff)
parent46be82dfd0850d7e96b1401a81a396e0cd0e0527 (diff)
Merge branch 'tr/xsize-bits'
* 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 02a73eeb66..fe845ae639 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;
}