1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-28 15:21:03 +01:00

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.
This commit is contained in:
Peter Stephenson 2017-05-08 18:00:55 +01:00
parent 641a764b82
commit af1c82d646
3 changed files with 13 additions and 1 deletions

View file

@ -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);