components/ksh93/patches/Bug17714341.patch
author Vladimir Marek <Vladimir.Marek@oracle.com>
Wed, 30 Oct 2013 13:40:46 +0100
changeset 1539 f92203f7c0c2
permissions -rw-r--r--
17714341 /usr/bin/cd core dumps during string substitution
--- a/src/cmd/ksh93/bltins/cd_pwd.c	2013-10-31 16:18:43.904039613 +0100
+++ b/src/cmd/ksh93/bltins/cd_pwd.c	2013-10-31 16:18:14.980499662 +0100
@@ -81,7 +81,7 @@
 	dir =  argv[0];
 	if(error_info.errors>0 || argc >2)
 		errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
-	oldpwd = (char*)shp->pwd;
+	oldpwd = path_pwd(shp,0);
 	opwdnod = (shp->subshell?sh_assignok(OLDPWDNOD,1):OLDPWDNOD); 
 	pwdnod = (shp->subshell?sh_assignok(PWDNOD,1):PWDNOD); 
 	if(argc==2)