Bash-4.4 patch 3

This commit is contained in:
Chet Ramey 2016-11-14 14:27:23 -05:00
commit 4f59a8babc
2 changed files with 10 additions and 1 deletions

View file

@ -330,6 +330,12 @@ PARSE_COLLSYM (p, vp)
for (pc = 0; p[pc]; pc++)
if (p[pc] == L('.') && p[pc+1] == L(']'))
break;
if (p[pc] == 0)
{
if (vp)
*vp = INVALID;
return (p + pc);
}
val = COLLSYM (p, pc);
if (vp)
*vp = val;
@ -483,6 +489,9 @@ BRACKMATCH (p, test, flags)
c = *p++;
c = FOLD (c);
if (c == L('\0'))
return ((test == L('[')) ? savep : (CHAR *)0);
if ((flags & FNM_PATHNAME) && c == L('/'))
/* [/] can never match when matching a pathname. */
return (CHAR *)0;