commit | c00e11df856d280d7cff64aed78385e5f8be26bd | [log] [tgz] |
---|---|---|
author | Eric Andersen <andersen@codepoet.org> | Fri Oct 08 08:14:58 2004 +0000 |
committer | Eric Andersen <andersen@codepoet.org> | Fri Oct 08 08:14:58 2004 +0000 |
tree | bb3966123f6881cc9aa72375aa9de483d4e80b60 | |
parent | 31c27a9c6559b46c5e20fd64eaa8019daaba5e5c [diff] |
Hiroshi Ito writes: ash "unset OLDPWD; cd -" causes segmentation fault. ( OLDPWD is not set when sh is invoked from getty. ) patch against current CVS is attached.
diff --git a/shell/ash.c b/shell/ash.c index f82a772..a592904 100644 --- a/shell/ash.c +++ b/shell/ash.c
@@ -2316,6 +2316,7 @@ dest = bltinlookup(homestr); else if (dest[0] == '-' && dest[1] == '\0') { dest = bltinlookup("OLDPWD"); + if ( !dest ) goto out; flags |= CD_PRINT; goto step7; }