From: H. Peter Anvin Date: Tue, 20 Sep 2005 00:09:41 GMT Subject: Re: [PATCH] Fix git-init-db creating crap directories Message-ID: <432F5345.3020303@zytor.com> In-Reply-To: <20050920000731.GJ18320@pasky.or.cz> Petr Baudis wrote: > 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