From 301f5ecb8d5fc1ed85942dd85d58f27a0c9a518a Mon Sep 17 00:00:00 2001 From: Cristian Ionescu-Idbohrn Date: Mon, 5 Oct 2009 02:07:23 +0200 Subject: [PATCH] ash: error out on ${#1#}, ${#$11}, ${#11#} Signed-off-by: Cristian Ionescu-Idbohrn Signed-off-by: Denys Vlasenko --- shell/ash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/ash.c b/shell/ash.c index 9f1f8a4de..44d3a99a7 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -11291,6 +11291,8 @@ parsesub: { badsub: raise_error_syntax("bad substitution"); } + if (c != '}' && subtype == VSLENGTH) + goto badsub; STPUTC('=', out); flags = 0;