projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46443a3
)
hush: do not allow sh -c '{ echo boo }'
author
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 7 Nov 2016 15:22:35 +0000
(16:22 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 7 Nov 2016 15:22:35 +0000
(16:22 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush.c
patch
|
blob
|
history
diff --git
a/shell/hush.c
b/shell/hush.c
index 0bc67ecc9ced55f860a12786b9c50992fc341181..a01db9c755cc53a2dc999ee23a907f5782534da9 100644
(file)
--- a/
shell/hush.c
+++ b/
shell/hush.c
@@
-4533,12
+4533,14
@@
static struct pipe *parse_stream(char **pstring,
syntax_error_unterm_str("here document");
goto parse_error;
}
- /* end_trigger == '}' case errors out earlier,
- * checking only ')' */
if (end_trigger == ')') {
syntax_error_unterm_ch('(');
goto parse_error;
}
+ if (end_trigger == '}') {
+ syntax_error_unterm_ch('{');
+ goto parse_error;
+ }
if (done_word(&dest, &ctx)) {
goto parse_error;