[Bug libc/14185] fnmatch() fails when '*' wildcard is applied on the file name containing multi-byte character(s)
bugdal at aerifal dot cx
sourceware-bugzilla@sourceware.org
Fri Jun 1 02:32:00 GMT 2012
http://sourceware.org/bugzilla/show_bug.cgi?id=14185
--- Comment #4 from Rich Felker <bugdal at aerifal dot cx> 2012-06-01 02:32:05 UTC ---
This patch fixes the bug in the test case, but I'm not convinced that it
doesn't create other (possibly much worse!) bugs in the process. For instance,
the pattern "[á]*" should not match "\xa1.txt", but with fallback to treating
everything as bytes, it does match. Basically this patch would make "rm -f
pattern" potentially delete lots of files with illegal byte sequences in their
names whenever pattern contains a bracket expression with multibyte characters
in it. (Note that the effect becomes even more severe with a range expression
like [à-á]...)
--
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.
More information about the Glibc-bugs
mailing list