diff options
-rw-r--r-- | shell/ash.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index f74bef6..b596833 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -12431,7 +12431,7 @@ parsesub: { STPUTC(c, out); c = pgetc_eatbnl(); } while (isdigit(c)); - } else { + } else if (c != '}') { /* $[{[#]]<specialchar>[}] */ int cc = c; @@ -12457,7 +12457,8 @@ parsesub: { } USTPUTC(cc, out); - } + } else + goto badsub; if (c != '}' && subtype == VSLENGTH) { /* ${#VAR didn't end with } */ |