]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: Fix a crash if a heredoc was not properly ended and parsing continued.
authorJilles Tjoelker <jilles@FreeBSD.org>
Sun, 30 May 2010 14:20:32 +0000 (14:20 +0000)
committerJilles Tjoelker <jilles@FreeBSD.org>
Sun, 30 May 2010 14:20:32 +0000 (14:20 +0000)
commit5d910070006cd5bf6a1460457b367b5fd6935c72
tree9e2de3ee284decbd9e2f657e05341f7a07d597fa
parentba02a307fe0a0d5253e0d5559db0b838703622ec
sh: Fix a crash if a heredoc was not properly ended and parsing continued.

Example (in interactive mode):
  cat <<EOF && )
The next command typed caused sh to segfault, because the state for the here
document was not reset.

Like parser_temp, this uses the fact that the parser is not re-entered.
bin/sh/parser.c
tools/regression/bin/sh/parser/heredoc6.0 [new file with mode: 0644]