diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-08-18 12:14:23 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-18 12:14:23 -0700 |
commit | 7e00a9104bc8ce27f73132fbaa8f8528e26206a8 (patch) | |
tree | c691d01d180f63c632dd08a4569f9cf4d616ec2f /git-compat-util.h | |
parent | Merge branch 'tc/checkout-B' (diff) | |
parent | xsize_t: check whether we lose bits (diff) | |
download | tgif-7e00a9104bc8ce27f73132fbaa8f8528e26206a8.tar.xz |
Merge branch 'tr/xsize-bits'
* tr/xsize-bits:
xsize_t: check whether we lose bits
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 2 |
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; } |