diff options
author | Ron Yorston | 2015-10-29 16:19:14 +0000 |
---|---|---|
committer | Denys Vlasenko | 2015-10-29 20:33:44 +0100 |
commit | ef2386b80abfb22ccb697ddbdd4047aacc395c50 (patch) | |
tree | 29cdff7d9d254f06913e499b4b25879b1811ab90 /shell/ash.c | |
parent | 3f221113a50196e536bfb059712915bd8bde10d1 (diff) | |
download | busybox-ef2386b80abfb22ccb697ddbdd4047aacc395c50.zip busybox-ef2386b80abfb22ccb697ddbdd4047aacc395c50.tar.gz |
ash: only allow local variables in functions
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index a2e0618..0d7cac0 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -8987,6 +8987,9 @@ localcmd(int argc UNUSED_PARAM, char **argv) { char *name; + if (!funcnest) + ash_msg_and_raise_error("not in a function"); + argv = argptr; while ((name = *argv++) != NULL) { mklocal(name); |