summary refs log tree commit diff
path: root/src/TOUR
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2011-03-15 17:41:53 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2011-03-15 17:41:53 +0800
commitec2c84d3c4dba4b74440d72bdd1de416a9acd2a9 (patch)
treeba0dc60e76629ab37a243b7b57efcb0ed297a6e3 /src/TOUR
parent[DEBUG] Use va_copy when reusing a va_list (diff)
downloaddash-ec2c84d3c4dba4b74440d72bdd1de416a9acd2a9.tar.gz
dash-ec2c84d3c4dba4b74440d72bdd1de416a9acd2a9.zip
[PARSER] Fix clobbering of checkkwd
On Sun, Nov 07, 2010 at 02:21:21AM +0000, Jonathan Nieder wrote:
>
> Just ran into some strange behavior:
>
> $ cat test.sh
> #!/bin/sh
> echo hello >greeting
> cat <<EOF &&
> $(cat greeting)
> EOF
> {
> 	echo $?
> 	cat greeting
> } >/dev/null
>
>
> $ sh test.sh
> hello
> test.sh: 7: {: not found
> 127
> hello
> test.sh: 10: Syntax error: "}" unexpected
>
> bash, mksh, pdksh, and ksh93 all print hello as expected.  The problem
> is reproducible with all versions of dash in the git repo.

This is caused by the clobbering of checkkwd due to readtoken
recursion while parsing a here document.

This patch fixes it by saving the original value of checkkwd.

Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
e9ea8c787e9fccd0003db409ac5c443f93868f&follow=1'>Allow FocusEvents in xtermJune McEnroe 2021-09-23Use NI_NUMERICSERVJune McEnroe 2021-09-23Make up build away from FreeBSDJune McEnroe 2021-09-23Add quickJune McEnroe 2021-09-23Add The HobbitJune McEnroe 2021-09-22Remove PSF fontsJune McEnroe 2021-09-22Remove Linux-specific utilitiesJune McEnroe 2021-09-22Call sandbox in CGI modeJune McEnroe 2021-09-22Support HTTP PUT in upJune McEnroe 2021-09-22Remove default faviconJune McEnroe 2021-09-21Use Z_FILTERED strategyJune McEnroe 2021-09-21Recalculate various lengths only as neededJune McEnroe 2021-09-21Rewrite pngo, add explicit optionsJune McEnroe 2021-09-16Fix /* **/ comment matchingJune McEnroe 2021-09-15Remove typer, add downgrade to READMEJune McEnroe 2021-09-15Set bot mode on downgradeJune McEnroe 2021-09-15Enter capsicum in downgradeJune McEnroe 2021-09-15Factor out common parts of downgrade messagesJune McEnroe 2021-09-14Add downgrade IRC botJune McEnroe 2021-09-14Sort by title if authors matchJune McEnroe 2021-09-13Swap-remove tags as they're foundJune McEnroe 2021-09-12Replace htagml regex with strncmpJune McEnroe 2021-09-11Also defer printing comment for lone close-parensJune McEnroe 2021-09-10Publish "git-comment"June McEnroe 2021-09-10Add git comment --pretty optionJune McEnroe 2021-09-08Defer printing comment if line is blank or closing braceJune McEnroe 2021-09-08Up default min-repeat to 30 linesJune McEnroe 2021-09-08Handle dirty lines in git-commentJune McEnroe 2021-09-08Document and install git-commentJune McEnroe 2021-09-08Add repeat and all options to git-commentJune McEnroe 2021-09-08Add group threshold to git-commentJune McEnroe