Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'tr/xsize-bits'
author
Junio C Hamano
<gitster@pobox.com>
Wed, 18 Aug 2010 19:14:23 +0000
(12:14 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 18 Aug 2010 19:14:23 +0000
(12:14 -0700)
* tr/xsize-bits:
xsize_t: check whether we lose bits
git-compat-util.h
patch
|
blob
|
history
raw
(from parent 1:
07cd900
)
diff --git
a/git-compat-util.h
b/git-compat-util.h
index 02a73eeb667e798fca29de25fed6b0b2900f6912..fe845ae639767dc8f56a9196a7faefb468737bba 100644
(file)
--- 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;
}