This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/14185] fnmatch() fails when '*' wildcard is applied on the file name containing multi-byte character(s)
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 10 Oct 2013 16:50:50 +0000
- Subject: [Bug libc/14185] fnmatch() fails when '*' wildcard is applied on the file name containing multi-byte character(s)
- Auto-submitted: auto-generated
- References: <bug-14185-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=14185
--- Comment #7 from Rich Felker <bugdal at aerifal dot cx> ---
A much better solution would be to rewrite fnmatch not to go through a
temporary wchar_t string at all. It's actually just as easy, if not easier, to
do the matching directly as a multibyte string. It can be done in-place (no
additional temporary storage at all) for standard fnmatch, but I'm not clear on
whether this can be made efficient for the GNU extensions. I believe it may
also be possible to adapt the twoway algorithm to fnmatch so that (at least
most) matches take linear time rather than quadratic time, but it's still quite
possible that I'm wrong on this (I haven't worked out enough of the details
yet).
--
You are receiving this mail because:
You are on the CC list for the bug.