[PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Jeff King
From: Junio C Hamano gits...@pobox.com The function takes two counted strings (basename, basenamelen and pattern, patternlen) as parameters, together with prefix (the length of the prefix in pattern that is to be matched literally without globbing against the basename) and EXC_* flags that tells

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

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 05:47:28PM -0400, Jeff King wrote: From: Junio C Hamano gits...@pobox.com The function takes two counted strings (basename, basenamelen and pattern, patternlen) as parameters, together with prefix (the length of the prefix in pattern that is to be matched literally

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

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 06:40:27PM -0400, Jeff King wrote: On Thu, Mar 28, 2013 at 05:47:28PM -0400, Jeff King wrote: From: Junio C Hamano gits...@pobox.com The function takes two counted strings (basename, basenamelen and pattern, patternlen) as parameters, together with prefix (the

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

2013-03-28 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Thu, Mar 28, 2013 at 06:40:27PM -0400, Jeff King wrote: On Thu, Mar 28, 2013 at 05:47:28PM -0400, Jeff King wrote: From: Junio C Hamano gits...@pobox.com The function takes two counted strings (basename, basenamelen and pattern, patternlen) as

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

2013-03-28 Thread Duy Nguyen
On Fri, Mar 29, 2013 at 5:49 AM, Jeff King p...@peff.net wrote: My match_pathspec fix breaks at least t1011. Haven't looked closely at the series, but I suspect you need this http://article.gmane.org/gmane.comp.version-control.git/219008 -- Duy -- To unsubscribe from this list: send the line

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

2013-03-28 Thread Duy Nguyen
On Fri, Mar 29, 2013 at 4:47 AM, Jeff King p...@peff.net wrote: +static int fnmatch_icase_mem(const char *pattern, int patternlen, +const char *string, int stringlen, +int flags) +{ + int match_status; + struct strbuf

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

2013-03-28 Thread Jeff King
On Fri, Mar 29, 2013 at 08:25:00AM +0700, Nguyen Thai Ngoc Duy wrote: On Fri, Mar 29, 2013 at 4:47 AM, Jeff King p...@peff.net wrote: +static int fnmatch_icase_mem(const char *pattern, int patternlen, +const char *string, int stringlen, +