|
|
Message-Id: <20251004230033.1606949-2-musl@raf.org>
Date: Sun, 5 Oct 2025 10:00:33 +1100
From: raf <musl@....org>
To: musl@...ts.openwall.com
Cc: raf <raf@....org>
Subject: [PATCH] fnmatch: add bare minimum support for character equivalents (e.g. [[=e=]])
From: raf <raf@....org>
---
src/regex/fnmatch.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/regex/fnmatch.c b/src/regex/fnmatch.c
index 978fff88..b8c71afa 100644
--- a/src/regex/fnmatch.c
+++ b/src/regex/fnmatch.c
@@ -146,6 +146,12 @@ static int match_bracket(const char *p, int k, int kfold)
iswctype(kfold, wctype(buf)))
return !inv;
}
+ if (z == '=' && *p0) {
+ wchar_t wc2;
+ int l = mbtowc(&wc2, p0, 4);
+ if (l < 0) return 0;
+ if (wc2==k || wc2==kfold) return !inv;
+ }
continue;
}
if (*p < 128U) {
--
2.39.5
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.