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

* nd/maint-compat-fnmatch-fix:
  compat/fnmatch: fix off-by-one character class's length check
This commit is contained in:
Junio C Hamano 2012-11-25 18:44:41 -08:00
Родитель e0a7f2bbbb f10e3864dc
Коммит 5ab539bb00
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;