hush: do not allow sh -c '{ echo boo }'
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -4533,12 +4533,14 @@ static struct pipe *parse_stream(char **pstring,
|
|||||||
syntax_error_unterm_str("here document");
|
syntax_error_unterm_str("here document");
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
}
|
}
|
||||||
/* end_trigger == '}' case errors out earlier,
|
|
||||||
* checking only ')' */
|
|
||||||
if (end_trigger == ')') {
|
if (end_trigger == ')') {
|
||||||
syntax_error_unterm_ch('(');
|
syntax_error_unterm_ch('(');
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
}
|
}
|
||||||
|
if (end_trigger == '}') {
|
||||||
|
syntax_error_unterm_ch('{');
|
||||||
|
goto parse_error;
|
||||||
|
}
|
||||||
|
|
||||||
if (done_word(&dest, &ctx)) {
|
if (done_word(&dest, &ctx)) {
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
|
Reference in New Issue
Block a user