diff options
author | Junio C Hamano <junkio@cox.net> | 2007-03-05 00:21:37 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-03-05 00:55:19 -0800 |
commit | 7efbff7531af4281487d54c1dc1401308d988e33 (patch) | |
tree | 025cfaf2225fbc027534d0d4ccd31a45cd4be38f /cache.h | |
parent | efec43c028c52bc252afdaa586b46f83186d3eaa (diff) | |
download | git-7efbff7531af4281487d54c1dc1401308d988e33.tar.gz git-7efbff7531af4281487d54c1dc1401308d988e33.tar.xz |
unpack_sha1_file(): detect corrupt loose object files.
We did not detect broken loose object files, either when
underlying inflate() signalled the breakage, nor inflate()
finished and we had garbage trailing at the end. We do better
now.
We also make unpack_sha1_file() a static function to
sha1_file.c, since it is not used by anybody outside.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -281,7 +281,6 @@ char *enter_repo(char *path, int strict); /* Read and unpack a sha1 file into memory, write memory to a sha1 file */ extern int sha1_object_info(const unsigned char *, unsigned long *); -extern void * unpack_sha1_file(void *map, unsigned long mapsize, enum object_type *type, unsigned long *size); extern void * read_sha1_file(const unsigned char *sha1, enum object_type *type, unsigned long *size); extern int hash_sha1_file(void *buf, unsigned long len, const char *type, unsigned char *sha1); extern int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned char *return_sha1); |