From: Junio C Hamano Date: Mon, 26 Nov 2012 02:44:41 +0000 (-0800) Subject: Merge branch 'nd/maint-compat-fnmatch-fix' X-Git-Tag: v1.8.1-rc0~29 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5ab539bb005498bc3cbf37d57a939b809a1c3dbc?hp=e0a7f2bbbbe9adfc9389c91a58ae44f85538e575 Merge branch 'nd/maint-compat-fnmatch-fix' * nd/maint-compat-fnmatch-fix: compat/fnmatch: fix off-by-one character class's length check --- diff --git a/compat/fnmatch/fnmatch.c b/compat/fnmatch/fnmatch.c index 9473aed2bb..0ff1d273a5 100644 --- a/compat/fnmatch/fnmatch.c +++ b/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;