ash: error out on ${#1#}, ${#$11}, ${#11#}
authorCristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Mon, 5 Oct 2009 00:07:23 +0000 (02:07 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 5 Oct 2009 00:07:23 +0000 (02:07 +0200)
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c

index 9f1f8a4de981a78ef238b9435438c145f80fe200..44d3a99a7107b2639980029ae8db5780478c4d12 100644 (file)
@@ -11291,6 +11291,8 @@ parsesub: {
  badsub:
                        raise_error_syntax("bad substitution");
                }
+               if (c != '}' && subtype == VSLENGTH)
+                       goto badsub;
 
                STPUTC('=', out);
                flags = 0;