Skip to content

Commit 86ef7b3

Browse files
committed
Merge branch 'nd/maint-compat-fnmatch-fix' into maint
* nd/maint-compat-fnmatch-fix: compat/fnmatch: fix off-by-one character class's length check
2 parents ed20513 + f10e386 commit 86ef7b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/fnmatch/fnmatch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ internal_fnmatch (pattern, string, no_leading_period, flags)
345345

346346
for (;;)
347347
{
348-
if (c1 == CHAR_CLASS_MAX_LENGTH)
348+
if (c1 > CHAR_CLASS_MAX_LENGTH)
349349
/* The name is too long and therefore the pattern
350350
is ill-formed. */
351351
return FNM_NOMATCH;

0 commit comments

Comments
 (0)