This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17401] New: globbing not consistent for unterminated `[' match
- From: "33user at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 16 Sep 2014 23:44:27 +0000
- Subject: [Bug libc/17401] New: globbing not consistent for unterminated `[' match
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17401
Bug ID: 17401
Summary: globbing not consistent for unterminated `[' match
Product: glibc
Version: 2.19
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: 33user at gmail dot com
CC: drepper.fsp at gmail dot com
for example: the pattern "[[" does not match "[[", but the pattern "[z" matches
"[z".
Anotehr example: the pattern "[z[" does not match "[z[" but "[zw" matche "[zw".
the key is, that we tentatively interpret the starting [ as a bracket
match...and then if we find a match from one of the characters after the
opening bracket, we conclude (too early?) that this is a bracket match, and
therefore, when no terminating ] was found, we give up..
whereas, where we still didn't find a match, and we continue to scan the
pattren and reach the terminating null byte, we retract and interpret the whole
pattern as a normal pattern (i.e. not a bracket)..and therefore [[ for exmaple
matches [[ and [zw matches [zw...
again, this is a verbose "interpretation" for the source code...how it decides
where when to retract or not...but it still looks buggy
--
You are receiving this mail because:
You are on the CC list for the bug.