|
|
Message-ID: <20261015234906.GV23438@brightrain.aerifal.cx>
Date: Thu, 15 Oct 2026 19:49:06 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: fnmatch: invalid multibyte sequence in the string is
taken as end of string ("" matches "\xff" in UTF-8 locales)
On Thu, Oct 15, 2026 at 07:17:16PM -0400, Rich Felker wrote:
> On Fri, Oct 16, 2026 at 09:40:27AM +1100, raf wrote:
> > the only one. I'd expect glibc's fnmatch to fail, because
> > it tries to match text as characters and then as individual
> > bytes (e.g., ?? matches éé and é).
>
> What is your source for that? AFAICT it does the right thing,
> operating on characters.
OK, I looked up the glibc source and it's indeed doing this horribly
wrong. If there are any bytes that don't parse as characters in the
pattern or string, it switches the whole match operation to a
byte-based one.
This is.... bad.
Rich
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.