Permalink
Browse files

Merge branch 'nd/maint-compat-fnmatch-fix'

* nd/maint-compat-fnmatch-fix:
  compat/fnmatch: fix off-by-one character class's length check
  • Loading branch information...
2 parents e0a7f2b + f10e386 commit 5ab539bb005498bc3cbf37d57a939b809a1c3dbc @gitster committed Nov 26, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 compat/fnmatch/fnmatch.c
@@ -345,7 +345,7 @@ internal_fnmatch (pattern, string, no_leading_period, flags)
for (;;)
{
- if (c1 == CHAR_CLASS_MAX_LENGTH)
+ if (c1 > CHAR_CLASS_MAX_LENGTH)
/* The name is too long and therefore the pattern
is ill-formed. */
return FNM_NOMATCH;

0 comments on commit 5ab539b

Please sign in to comment.