diff options
author | Peter Stephenson <pws@zsh.org> | 2017-07-13 17:20:24 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2017-07-13 17:20:24 +0100 |
commit | a3b3f00575160f1b65ec2b60feba073da2309d0e (patch) | |
tree | 3dc5d4ed603680a8e40b5669ba55800afe94bcb0 | |
parent | 050f752ed22e1768e981968c48f5a432e390ad40 (diff) | |
download | zsh-a3b3f00575160f1b65ec2b60feba073da2309d0e.tar.gz zsh-a3b3f00575160f1b65ec2b60feba073da2309d0e.tar.xz zsh-a3b3f00575160f1b65ec2b60feba073da2309d0e.zip |
41420: "{.." wasn't check for brace expansion properly
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/glob.c | 2 | ||||
-rw-r--r-- | Test/D09brace.ztst | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 7f4581d3d..182f42c1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-07-13 Peter Stephenson <p.stephenson@samsung.com> + + * 41420: Src/glob.c, Test/D09brace.ztst: "{.." wasn't checked + properly. + 2017-07-11 Peter Stephenson <p.stephenson@samsung.com> * Marcin Mielniczuk: 41409: Completion/Unix/Command/_django: diff --git a/Src/glob.c b/Src/glob.c index af5d0821c..c9ec97e0e 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -2194,6 +2194,8 @@ bracechardots(char *str, convchar_t *c1p, convchar_t *c2p) pnext[0] != '.' || pnext[1] != '.') return 0; pnext += 2; + if (!*pnext) + return 0; if (itok(*pnext)) { if (*pnext == Inbrace) return 0; diff --git a/Test/D09brace.ztst b/Test/D09brace.ztst index 3e667a8d1..580ed430f 100644 --- a/Test/D09brace.ztst +++ b/Test/D09brace.ztst @@ -112,3 +112,7 @@ print -r left{[..]}right 0:{char..char} ranges with tokenized characters >left[right left\right left]right + + print -r {1..10}{.. +0:Unmatched braces after matched braces are left alone. +>1{.. 2{.. 3{.. 4{.. 5{.. 6{.. 7{.. 8{.. 9{.. 10{.. |