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 sources dot redhat dot com
- Date: Thu, 31 May 2012 00:29:51 +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@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14185
Rich Felker <bugdal at aerifal dot cx> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugdal at aerifal dot cx
--- Comment #1 from Rich Felker <bugdal at aerifal dot cx> 2012-05-31 00:29:51 UTC ---
While this is not a conformance issue (actually, the most correct/conformant
thing may be to reject as non-matching or give an error on invalid strings like
this), I believe it is a quality-of-implementation issue. It makes it
unnecessarily difficult to do things like deleting junk files created by an
obnoxious user or extracting a corrupt archive file (or just one created by
someone with poor taste in character encoding); "rm -f *" will fail.
As a related (same fundamental cause: the conversion to a wchar_t string)
quality-of-implementation issue, fnmatch("*", huge_string, 0) fails on glibc
even though it should obviously match without even having to inspect
huge_string, much less make a 4x-size copy of it.
Unfortunately glibc's fnmatch implementation is just really ugly, and I don't
think issues like this can be fixed without piling on ugly hacks, or just
replacing the implementation with something saner...
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.