diff options
author | Peter Stephenson <pws@zsh.org> | 2016-10-25 11:53:49 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2016-10-25 11:53:49 +0100 |
commit | 39ae9cd10a5987ac71dee8bef7bd3bc2ba5e4eb8 (patch) | |
tree | 2e45b010125e0bfd6bc9c90dfee4d85315d0e081 /Src | |
parent | 0f5e670cde5f844680a20f986786249dfe983584 (diff) | |
download | zsh-39ae9cd10a5987ac71dee8bef7bd3bc2ba5e4eb8.tar.gz zsh-39ae9cd10a5987ac71dee8bef7bd3bc2ba5e4eb8.tar.xz zsh-39ae9cd10a5987ac71dee8bef7bd3bc2ba5e4eb8.zip |
39723: metafy string passed to pattern in complist.
Also additional safety tokenizing a string with Meta characters.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/complist.c | 1 | ||||
-rw-r--r-- | Src/glob.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index 39ac782eb..d4672a194 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -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; diff --git a/Src/glob.c b/Src/glob.c index a845c5fbb..50f6dceb3 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -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 '\\': |