Thread (37 messages) flat view 37 messages, 5 authors, 2016-06-15

Re: [PATCH 4/6] dir.c::match_pathname(): pay attention to the length of string parameters

From: Duy Nguyen <hidden>
Date: 2016-06-15 22:56:34

Possibly related (same subject, not in this thread)

On Fri, Mar 29, 2013 at 3:45 PM, Duy Nguyen [off-list ref] wrote:
On Fri, Mar 29, 2013 at 4:48 AM, Jeff King [off-list ref] wrote:
quoted
-       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.
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.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help