Re: [PATCH] Fix git-init-db creating crap directories
- From
- H. Peter Anvin <hpa@zytor.com>
- Date
- Sep 20, 2005, 00:09 UTC
- Message-ID
- <432F5345.3020303@zytor.com>
- In-Reply-To
- <20050920000731.GJ18320@pasky.or.cz>
Petr Baudis wrote:
Show 11 quoted lines
> diff --git a/init-db.c b/init-db.c > --- a/init-db.c > +++ b/init-db.c > @@ -153,7 +153,8 @@ static void copy_templates(const char *g > return; > } > > - memcpy(path, git_dir, len); > + memcpy(path, git_dir, len-1); > + path[len] = 0; > copy_templates_1(path, len,
Wrong! You're not initializing path[len-1]!
-hpa