ash: do not truncate failed tilde expansion on unknown user names
Do not skip over "*p = c;" statement. Testcase: echo ~~nouser/qwe function old new delta argstr 1396 1406 +10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
7750b5a25a
commit
5fe20cf321
@ -6532,9 +6532,7 @@ exptilde(char *startp, int flag)
|
||||
home = lookupvar("HOME");
|
||||
} else {
|
||||
pw = getpwnam(name);
|
||||
if (pw == NULL)
|
||||
goto lose;
|
||||
home = pw->pw_dir;
|
||||
home = pw ? pw->pw_dir : NULL;
|
||||
}
|
||||
*p = c;
|
||||
if (!home)
|
||||
|
Loading…
Reference in New Issue
Block a user