Fix a segfault in lash, hush, and cmdedit. Each of these used
xgetcwd, but did not check the return for a NULL, and then continued to call strlen on the NULL when the cwd had been removed from under it. -Erik
This commit is contained in:
1 parent
9d94deabd3
commit
5f265b755a
10 files changed
+40
-5
No files matched your search
@@ -355,6 +355,10 @@ static void parse_prompt(const char *prmt_ptr)
|
||||
char c;
|
||||
char *pbuf;
|
||||
|
||||
if (!pwd_buf) {
|
||||
pwd_buf=unknown;
|
||||
}
|
||||
|
||||
while (*prmt_ptr) {
|
||||
pbuf = buf;
|
||||
pbuf[1] = 0;
|
||||
|
||||
Reference in new issue
Block a user