summary refs log tree commit diff
path: root/src/funcs/dirs
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/funcs/dirs
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 'src/funcs/dirs')
0 files changed, 0 insertions, 0 deletions
e.c?h=1.2&id=4d532ec738259a146319183df8a244423563e755&follow=1'>Take first two words in colorMentionsJune McEnroe This lets phrases like "hi june" get colored, but still doesn't get carried away. 2020-02-11Use time_t for save signatureJune McEnroe It's actually more likely to be 64-bit than size_t anyway, and it eliminates some helper functions. Also don't error when reading an empty save file. 2020-02-11Set self.nick to * initiallyJune McEnroe Allows removing a bunch of checks that self.nick is set, and it's what the server usually calls you before registration. Never highlight notices as mentions. 2020-02-11Define ColorCap instead of hardcoding 100June McEnroe 2020-02-11Move hash to top of chat.hJune McEnroe 2020-02-11Move base64 out of chat.hJune McEnroe 2020-02-11Move XDG_SUBDIR out of chat.hJune McEnroe 2020-02-11Fix whois idle unit calculationJune McEnroe Rookie mistake. 2020-02-11Cast towupper to wchar_tJune McEnroe For some reason it takes and returns wint_t... 2020-02-11Cast set but unused variables to voidJune McEnroe 2020-02-11Declare strlcatJune McEnroe 2020-02-11Check if VDSUSP existsJune McEnroe 2020-02-11Fix completeReplace iterationJune McEnroe 2020-02-11Use pkg(8) to configure on FreeBSDJune McEnroe 2020-02-11Remove legacy codeJune McEnroe 2020-02-11Add INSTALLING section to READMEJune McEnroe