diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-06-25 02:08:38 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-06-25 02:08:38 +0200 |
| commit | ad57e4e4b23926002ce72979729b017520bef1d0 (patch) | |
| tree | 50d55a641789e22f875b520741bfb7dc64395e60 | |
| parent | 53e5c598217db8b6a4e3cddefa260dd5cf0863ea (diff) | |
| download | busybox-w32-ad57e4e4b23926002ce72979729b017520bef1d0.tar.gz busybox-w32-ad57e4e4b23926002ce72979729b017520bef1d0.tar.bz2 busybox-w32-ad57e4e4b23926002ce72979729b017520bef1d0.zip | |
ash: revert accidental change (should have been separate)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| -rw-r--r-- | shell/ash.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index 2eac6e113..bee81920a 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -12751,7 +12751,7 @@ parsesub: { | |||
| 12751 | do { | 12751 | do { |
| 12752 | STPUTC(c, out); | 12752 | STPUTC(c, out); |
| 12753 | c = pgetc_eatbnl(); | 12753 | c = pgetc_eatbnl(); |
| 12754 | } while ((subtype == 0 || subtype == VSLENGTH) && isdigit(c)); | 12754 | } while (!subtype && isdigit(c)); |
| 12755 | } else if (c != '}') { | 12755 | } else if (c != '}') { |
| 12756 | /* $[{[#]]<specialchar>[}] */ | 12756 | /* $[{[#]]<specialchar>[}] */ |
| 12757 | int cc = c; | 12757 | int cc = c; |
| @@ -12781,6 +12781,11 @@ parsesub: { | |||
| 12781 | } else | 12781 | } else |
| 12782 | goto badsub; | 12782 | goto badsub; |
| 12783 | 12783 | ||
| 12784 | if (c != '}' && subtype == VSLENGTH) { | ||
| 12785 | /* ${#VAR didn't end with } */ | ||
| 12786 | goto badsub; | ||
| 12787 | } | ||
| 12788 | |||
| 12784 | if (subtype == 0) { | 12789 | if (subtype == 0) { |
| 12785 | static const char types[] ALIGN1 = "}-+?="; | 12790 | static const char types[] ALIGN1 = "}-+?="; |
| 12786 | /* ${VAR...} but not $VAR or ${#VAR} */ | 12791 | /* ${VAR...} but not $VAR or ${#VAR} */ |
| @@ -12837,8 +12842,6 @@ parsesub: { | |||
| 12837 | #endif | 12842 | #endif |
| 12838 | } | 12843 | } |
| 12839 | } else { | 12844 | } else { |
| 12840 | if (subtype == VSLENGTH && c != '}') | ||
| 12841 | subtype = 0; | ||
| 12842 | badsub: | 12845 | badsub: |
| 12843 | pungetc(); | 12846 | pungetc(); |
| 12844 | } | 12847 | } |
