>From b18c5975c283a38cef15e9cc7a191cf50d7495ae Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 5 Oct 2026 20:05:53 -0400 Subject: [PATCH 4/6] fnmatch: ignore invalid encodings in bracket previously, the bracket was forced to be non-matching if it contained any bytes that did not parse as valid characters. --- src/regex/fnmatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regex/fnmatch.c b/src/regex/fnmatch.c index 449d3d15..57394bdf 100644 --- a/src/regex/fnmatch.c +++ b/src/regex/fnmatch.c @@ -149,7 +149,7 @@ static int match_bracket(const char *p, int k, int kfold) wc = (unsigned char)*p; } else { int l = mbtowc(&wc, p, 4); - if (l < 0) return 0; + if (l < 0) continue; p += l-1; } if (is_range) { -- 2.21.0