* lib/fnmatch_loop.c (FCT): When matching '[' keep track of
beginning and fall back to matching as normal character if the
string ends before the matching ']' is found. This is what POSIX
requires.
+2011-05-11 Ulrich Drepper <drepper@gmail.com>
+
+ Sync glibc change fixing Bugzilla bug #12378.
+ * lib/fnmatch_loop.c (FCT): When matching '[' keep track of
+ beginning and fall back to matching as normal character if the
+ string ends before the matching ']' is found. This is what POSIX
+ requires.
+
2011-05-13 Eric Blake <eblake@redhat.com>
getcwd-lgpl: relax test for FreeBSD
case L_('['):
{
/* Nonzero if the sense of the character class is inverted. */
+ CHAR *p_init = p;
+ CHAR *n_init = n;
register bool not;
CHAR cold;
UCHAR fn;
}
#endif
else if (c == L_('\0'))
- /* [ (unterminated) loses. */
- return FNM_NOMATCH;
+ {
+ /* [ unterminated, treat as normal character. */
+ p = p_init;
+ n = n_init;
+ c = L_('[');
+ goto normal_match;
+ }
else
{
bool is_range = false;