From: Junio C Hamano Date: Thu, 07 Mar 2013 23:59:15 GMT Subject: Re: [PATCH] setup.c: Fix prefix_pathspec from looping pass end of string Message-ID: <7vvc92kbho.fsf@alter.siamese.dyndns.org> In-Reply-To: Andrew Wong writes: > On 3/7/13, Junio C Hamano wrote: >> The parser that goes past the end of the string may be a bug worth >> fixing, but is this patch sufficient to diagnose such an input as an >> error? > > Yea, the patch should fix the passing end of string too. The parser > was going past end of string because the nextat is set to "copyfrom + > len + 1" for the '\0' case too. Then "+ 1" causes the parser to go > pass end of string. If we handle the '\0' case separately, then the > parser ends properly, and shouldn't be able to go pass the end of > string. This did not error out for me, though. $ cd t && git ls-files ":(top"