Skip to content

Commit

Permalink
Merge branch 'nd/maint-compat-fnmatch-fix' into maint
Browse files Browse the repository at this point in the history
* nd/maint-compat-fnmatch-fix:
  compat/fnmatch: fix off-by-one character class's length check
  • Loading branch information
Junio C Hamano committed Nov 27, 2012
2 parents ed20513 + f10e386 commit 86ef7b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compat/fnmatch/fnmatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 86ef7b3

Please sign in to comment.