klibc-bot for Herbert Xu
2019-Jan-25 03:15 UTC
[klibc] [klibc:update-dash] parser: Fix backquote support in here-document EOF mark
Commit-ID: 5048195d282d48b25a9a0164e60cd0e6708ec8a9 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=5048195d282d48b25a9a0164e60cd0e6708ec8a9 Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Thu, 15 Mar 2018 18:27:30 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Fri, 25 Jan 2019 02:57:21 +0000 [klibc] parser: Fix backquote support in here-document EOF mark Currently using backquotes in a here-document EOF mark is broken because dash tries to do command substitution on it. This patch fixes it by checking whether we're looking for an EOF mark during tokenisation. Reported-by: Harald van Dijk <harald at gigawatt.nl> Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/parser.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr/dash/parser.c b/usr/dash/parser.c index cd980941..ae76400e 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -1037,6 +1037,11 @@ toggledq: } break; case CBQUOTE: /* '`' */ + if (checkkwd & CHKEOFMARK) { + USTPUTC('`', out); + break; + } + PARSEBACKQOLD(); break; case CEOF:
Maybe Matching Threads
- [klibc:update-dash] dash: parser: Fix backquote support in here-document EOF mark
- Backquote in R syntax
- [klibc:update-dash] dash: expand: Fix trailing newlines processing in backquote expanding
- Stubbing Kernel.` (backquote)
- model.matrix.default chokes on backquote (PR#7202)