ladybird/Userland/Shell
Ali Mohammad Pur 70728b49e2 Shell: Move the heredocs vector to a local value before processing it
Otherwise we would end up trying to parse the same heredoc entry, if it
contained a sequence terminated by a newline.
e.g. `<<-x\n$({` would attempt to read a heredoc entry after `x`, and
then after `{` while inside the first heredoc entry.
To make this work, we can simply empty the instance vector and keep the
state on the stack.
Issue found through oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33852
2021-05-01 15:58:31 +02:00
..
Tests Shell: Add some tests for heredocs 2021-04-29 20:25:56 +02:00
AST.cpp Shell: Add support for heredocs 2021-04-29 20:25:56 +02:00
AST.h Shell: Make set_is_syntax_error() also copy the error location 2021-05-01 15:58:31 +02:00
Builtin.cpp Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
CMakeLists.txt Shell: Add support for 'immediate' expressions as variable substitutions 2021-03-07 10:59:51 +01:00
Execution.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Formatter.cpp Shell: Implement formatting for Heredocs 2021-04-29 20:25:56 +02:00
Formatter.h Shell: Implement formatting for Heredocs 2021-04-29 20:25:56 +02:00
Forward.h Shell: Add support for heredocs 2021-04-29 20:25:56 +02:00
ImmediateFunctions.cpp Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
Job.cpp Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
Job.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
main.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
NodeVisitor.cpp Shell: Add support for heredocs 2021-04-29 20:25:56 +02:00
NodeVisitor.h Shell: Add support for heredocs 2021-04-29 20:25:56 +02:00
Parser.cpp Shell: Move the heredocs vector to a local value before processing it 2021-05-01 15:58:31 +02:00
Parser.h Shell: Add support for heredocs 2021-04-29 20:25:56 +02:00
Shell.cpp Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
Shell.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
SyntaxHighlighter.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
SyntaxHighlighter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00