X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=git-compat-util.h;h=fe845ae639767dc8f56a9196a7faefb468737bba;hb=c099789bb01b810e40f9cfaa5c842ed568110fc8;hp=02a73eeb667e798fca29de25fed6b0b2900f6912;hpb=24e7a5be373c95f977bab4f0f41f736bb1d25075;p=git.git 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; }