summary refs log tree commit diff
path: root/src/eval.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2018-04-03 01:04:55 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2018-04-19 18:19:30 +0800
commit48ca00863af909461d1372998bb90549f27abaaf (patch)
tree520593b8f7a0350d8ac3fd8016a2349935429b63 /src/eval.c
parentparser: Fix parsing of ${} (diff)
downloaddash-48ca00863af909461d1372998bb90549f27abaaf.tar.gz
dash-48ca00863af909461d1372998bb90549f27abaaf.zip
parser: Fix parameter expansion inside inner double quotes
The parsing of parameter expansion inside inner double quotes
breaks because we never look for ENDVAR while innerdq is true.

	echo "${x#"${x+''}"''}

This patch fixes it by pushing the syntax stack if innerdq is
true and we enter a new parameter expansion.

This patch also fixes a corner case where a bad substitution error
occurs within arithmetic expansion.

Reported-by: Denys Vlasenko <vda.linux@googlemail.com>
Fixes: ab1cecb40478 (" parser: Add syntax stack for recursive...")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions