]> git.ipfire.org Git - thirdparty/git.git/blobdiff - pack.h
pack.h: define largest possible encoded object size
[thirdparty/git.git] / pack.h
diff --git a/pack.h b/pack.h
index 87e456d5eacdedfe5abd04d2cb827d88fb858c82..5c2158746ed60f5c1d4f89dce04312e5992b959d 100644 (file)
--- a/pack.h
+++ b/pack.h
@@ -84,6 +84,12 @@ extern int verify_pack(struct packed_git *, verify_fn fn, struct progress *, uin
 extern off_t write_pack_header(struct sha1file *f, uint32_t);
 extern void fixup_pack_header_footer(int, unsigned char *, const char *, uint32_t, unsigned char *, off_t);
 extern char *index_pack_lockfile(int fd);
+
+/*
+ * The "hdr" output buffer should be at least this big, which will handle sizes
+ * up to 2^67.
+ */
+#define MAX_PACK_OBJECT_HEADER 10
 extern int encode_in_pack_object_header(unsigned char *hdr, int hdr_len,
                                        enum object_type, uintmax_t);