diff options
author | Denys Vlasenko | 2021-09-08 00:39:16 +0200 |
---|---|---|
committer | Denys Vlasenko | 2021-09-08 00:39:16 +0200 |
commit | 30af5938afad076e12b8ece123cab0b8bc92a596 (patch) | |
tree | 845ac3f69f996ddc91e37cd2f07a34636cdd5bdf /coreutils/cp.c | |
parent | 6a9b3f7acfaa7365515f1eb70427d5ddd687c162 (diff) | |
download | busybox-30af5938afad076e12b8ece123cab0b8bc92a596.zip busybox-30af5938afad076e12b8ece123cab0b8bc92a596.tar.gz |
ash: parser: Fix handling of empty aliases
Upstream commit:
Date: Tue, 28 Apr 2020 01:15:26 +1000
parser: Fix handling of empty aliases
Dash was incorrectly handling empty aliases. When attempting to use an
empty alias with nothing else, I'm (incorrectly) prompted for more
input:
```
$ alias empty=''
$ empty
>
```
Other shells (e.g., bash, yash) correctly handle the lone, empty alias as an
empty command:
```
$ alias empty=''
$ empty
$
```
The problem here is that we incorrectly enter the loop eating TNLs
in readtoken(). This patch fixes it by setting checkkwd correctly.
function old new delta
list 351 355 +4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/cp.c')
0 files changed, 0 insertions, 0 deletions