From: Duy Nguyen Date: Fri, 29 Mar 2013 11:37:52 GMT Subject: Re: [PATCH 4/6] dir.c::match_pathname(): pay attention to the length of string parameters Message-ID: In-Reply-To: <51557BE5.8000305@web.de> On Fri, Mar 29, 2013 at 6:32 PM, Torsten Bögershausen wrote: >> Just tested. t0003 and t3001 on 'pu' work for me because I have >> USE_WILDMATCH on (which turns FNM_PATHNAME to WM_PATHNAME). Both break >> without USE_WILDMATCH. >> > Hm, tested what? Tested t0003 and t3001 with and without USE_WILDMATCH, which is pretty much like you patch, except that wildmatch is used instead of fnmatch. > diff --git a/dir.c b/dir.c > index 73a08af..0b63167 100644 > --- a/dir.c > +++ b/dir.c > @@ -564,7 +564,7 @@ int match_pathname(const char *pathname, int pathlen, > > return fnmatch_icase_mem(pattern, patternlen, > name, namelen, > - FNM_PATHNAME) == 0; > + WM_PATHNAME) == 0; > } > > Gives only one breakage, so we are coming closer. > > > *** t3001-ls-files-others-exclude.sh *** > [snip] > not ok 17 - ls-files with "**" patterns > > > -- Duy