This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/14185] fnmatch() fails when '*' wildcard is applied on the file name containing multi-byte character(s)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]