X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Findex-pack.c;h=8dc5c0b5410d4bb57607bab690126f22d954dd7a;hb=5c28a8b054cb69a37638b0261fc370422c8fab58;hp=2e680d7a7ac3495c9d6bd10e0fa6a6ae28bb8670;hpb=2acf3658a31249d1a09573e2b6870871b5323121;p=git.git diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 2e680d7a7..8dc5c0b54 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -11,7 +11,7 @@ #include "exec_cmd.h" static const char index_pack_usage[] = -"git index-pack [-v] [-o ] [{ --keep | --keep= }] [--strict] { | --stdin [--fix-thin] [] }"; +"git index-pack [-v] [-o ] [ --keep | --keep= ] [--strict] ( | --stdin [--fix-thin] [])"; struct object_entry { @@ -161,7 +161,7 @@ static void use(int bytes) input_offset += bytes; /* make sure off_t is sufficiently large not to wrap */ - if (consumed_bytes > consumed_bytes + bytes) + if (signed_add_overflows(consumed_bytes, bytes)) die("pack too large for current definition of off_t"); consumed_bytes += bytes; }