summaryrefslogtreecommitdiff
path: root/Src/parse.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-05-08 18:00:55 +0100
committerPeter Stephenson <pws@zsh.org>2017-05-08 18:00:55 +0100
commitaf1c82d646d2f1fa9cecbfcffd0159cc3cebe237 (patch)
tree14d2e3c92dec4c12afc753cccd4e8f301823f17f /Src/parse.c
parent641a764b8203de5e5f5c9f1d6d5b0a48c26ca9e7 (diff)
downloadzsh-af1c82d646d2f1fa9cecbfcffd0159cc3cebe237.tar.gz
zsh-af1c82d646d2f1fa9cecbfcffd0159cc3cebe237.zip
40173: Off-by-one error checking for {varid}.
This caused a single unprintable character in braces before a redirection to be treated as an indentifier.
Diffstat (limited to 'Src/parse.c')
-rw-r--r--Src/parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/parse.c b/Src/parse.c
index b0de9a863..8769baae4 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -1836,7 +1836,7 @@ par_simple(int *cmplx, int nr)
if (*ptr == Outbrace && ptr > tokstr + 1)
{
- if (itype_end(tokstr+1, IIDENT, 0) >= ptr - 1)
+ if (itype_end(tokstr+1, IIDENT, 0) >= ptr)
{
char *toksave = tokstr;
char *idstring = dupstrpfx(tokstr+1, eptr-tokstr-1);