> --- a/dir.c > +++ b/dir.c > @@ -636,12 +636,14 @@ int match_basename(const char *basename, int basenamelen, > int flags) > { > if (prefix == patternlen) { > - if (!strcmp_icase(pattern, basename)) > + if (patternlen == basenamelen && > + !strncmp_icase(pattern, basename, patternlen)) > return 1; > } else if (flags & EXC_FLAG_ENDSWITH) { > if (patternlen - 1 <= basenamelen && > - !strcmp_icase(pattern + 1, > - basename + basenamelen - patternlen + 1)) > + !strncmp_icase(pattern + 1, > + basename + basenamelen - patternlen + 1, > + patternlen - 1)) > return 1; I can see that you kept strncmp(), was it worse with memcmp() ? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html