1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-12-07 18:11:20 +01:00

39723: metafy string passed to pattern in complist.

Also additional safety tokenizing a string with Meta characters.
This commit is contained in:
Peter Stephenson 2016-10-25 11:53:49 +01:00
parent 0f5e670cde
commit 39ae9cd10a
3 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2016-10-25 Peter Stephenson <p.stephenson@samsung.com>
* 39723: Src/Zle/complist.c, Src/glob.c: metafy string to be
used in pattern for complist. Also skip metafied characters
when tokenizing (typically this has no effect, however).
2016-10-24 Barton E. Schaefer <schaefer@zsh.org>
* unposted: NEWS, README: update for 39704.

View file

@ -415,6 +415,7 @@ getcoldef(char *s)
break;
*s++ = '\0';
}
p = metafy(p, strlen(p), META_USEHEAP);
tokenize(p);
if ((prog = patcompile(p, 0, NULL))) {
Patcol pc, po;

View file

@ -3499,6 +3499,10 @@ zshtokenize(char *s, int flags)
for (; *s; s++) {
cont:
switch (*s) {
case Meta:
/* skip both Meta and following character */
s++;
break;
case Bnull:
case Bnullkeep:
case '\\':