← Commit list

5fe20cf32

Denys Vlasenko
Denys Vlasenko
2022-03-01
SUCCESS Duration: 154s

Subject

ash: do not truncate failed tilde expansion on unknown user names

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+1 -3
@@ -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)