path: root/pack.h
diff options
authorNicolas Pitre <>2008-08-29 20:07:59 (GMT)
committerJunio C Hamano <>2008-08-30 04:51:27 (GMT)
commitabeb40e5aa5b4a39799ae1caad241c8c7708053a (patch)
tree6fb35911f6750230ade15c390256bb237f5e0019 /pack.h
parent6ed7f25e95069a900b10f838b15639af3fac05d3 (diff)
improve reliability of fixup_pack_header_footer()
Currently, this function has the potential to read corrupted pack data from disk and give it a valid SHA1 checksum. Let's add the ability to validate SHA1 checksum of existing data along the way, including before and after any arbitrary point in the pack. Signed-off-by: Nicolas Pitre <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'pack.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/pack.h b/pack.h
index 76e6aa2..a883334 100644
--- a/pack.h
+++ b/pack.h
@@ -58,7 +58,7 @@ struct pack_idx_entry {
extern char *write_idx_file(char *index_name, struct pack_idx_entry **objects, int nr_objects, unsigned char *sha1);
extern int check_pack_crc(struct packed_git *p, struct pack_window **w_curs, off_t offset, off_t len, unsigned int nr);
extern int verify_pack(struct packed_git *);
-extern void fixup_pack_header_footer(int, unsigned char *, const char *, 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);
#define PH_ERROR_EOF (-1)