Re: [PATCH 4/6] dir.c::match_pathname(): pay attention to the length of string parameters
- From
Jeff King <peff@peff.net>
- Date
- Mar 29, 2013, 12:05 UTC
- Message-ID
- <20130329120539.GA20711@sigill.intra.peff.net>
- In-Reply-To
- <CACsJy8DisE8UNZzqmOFxPqw=bmFiHgE5-ao83ciGNUV9Sc9-gA@mail.gmail.com>
On Fri, Mar 29, 2013 at 03:45:35PM +0700, Nguyen Thai Ngoc Duy wrote:
Show 13 quoted lines
> On Fri, Mar 29, 2013 at 4:48 AM, Jeff King <peff@peff.net> wrote: > > - return fnmatch_icase(pattern, name, FNM_PATHNAME) == 0; > > + return fnmatch_icase_mem(pattern, patternlen, > > + name, namelen, > > + FNM_PATHNAME) == 0; > > } > > I think you (or Junio) should rebase this on maint. Since c41244e > (included in maint), this call is turned to wildmatch(WM_PATHNAME) and > WM_PATHNAME is _not_ the same as FNM_PATHNAME for patterns like > "foo/**/bar". A diff between next and pu shows me that WM_PATHNAME is > incorrectly converted to FNM_PATHNAME. I hope that is the cause of all > breakages Junio found out on pu.
I don't think we want to rebase; the regression is in the v1.8.1 series, and I suspected that Junio was planning to ship a v1.8.1.6 with the fix. The wildmatch code comes in v1.8.2.
So we would want to do any adjustment to the fix when we merge up to maint.
-Peff