diff options
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c index 0b2bc01f5..d1f687f9d 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -4625,6 +4625,11 @@ static int fetch_heredocs(o_string *as_string, struct pipe *pi, int heredoc_cnt, | |||
4625 | 4625 | ||
4626 | redir->rd_type = REDIRECT_HEREDOC2; | 4626 | redir->rd_type = REDIRECT_HEREDOC2; |
4627 | /* redir->rd_dup is (ab)used to indicate <<- */ | 4627 | /* redir->rd_dup is (ab)used to indicate <<- */ |
4628 | if (!redir->rd_filename) { | ||
4629 | /* examples: "echo <<", "echo <<<", "echo <<>" */ | ||
4630 | syntax_error("missing here document terminator"); | ||
4631 | return -1; | ||
4632 | } | ||
4628 | p = fetch_till_str(as_string, input, | 4633 | p = fetch_till_str(as_string, input, |
4629 | redir->rd_filename, redir->rd_dup); | 4634 | redir->rd_filename, redir->rd_dup); |
4630 | if (!p) { | 4635 | if (!p) { |