Re: [PATCH] archive-tar: split long paths more carefully

2013-01-05 Thread Jonathan Nieder
René Scharfe wrote: --- a/archive-tar.c +++ b/archive-tar.c @@ -153,6 +153,8 @@ static unsigned int ustar_header_chksum(const struct ustar_header *header) static size_t get_path_prefix(const char *path, size_t pathlen, size_t maxlen) { size_t i = pathlen; + if (i 1 path[i

Re: [PATCH] archive-tar: split long paths more carefully

2013-01-05 Thread Junio C Hamano
René Scharfe rene.scha...@lsrfire.ath.cx writes: The name field of a tar header has a size of 100 characters. This limit was extended long ago in a backward compatible way by providing the additional prefix field, which can hold 155 additional characters. The actual path is constructed at