# HG changeset patch # User Tomas Klacko # Date 1444386364 25200 # Node ID d1cee1a4499d26ae62cb7ba3cbb7fb15b0124b2d # Parent b6f4cd2a91cf6d97f3cf6ff4a51955920658c630 21547336 sudo/cd crashes ksh93 because of free(e_dot) in b_cd() diff -r b6f4cd2a91cf -r d1cee1a4499d components/ksh93/Makefile --- a/components/ksh93/Makefile Fri Oct 09 03:15:31 2015 -0700 +++ b/components/ksh93/Makefile Fri Oct 09 03:26:04 2015 -0700 @@ -81,7 +81,7 @@ Bug15808407.patch Bug17714341.patch \ 17432413.patch 17824699.patch \ 17435456.patch 17851169.patch \ - Bug15993811.patch + Bug15993811.patch 21547336.patch # Fixup HOSTTYPE to match uname output and bits HOSTTYPE32=sol11.$(shell uname -p) diff -r b6f4cd2a91cf -r d1cee1a4499d components/ksh93/patches/21547336.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/ksh93/patches/21547336.patch Fri Oct 09 03:26:04 2015 -0700 @@ -0,0 +1,16 @@ +http://lists.research.att.com/pipermail/ast-developers/2015q3.txt +Message-ID: <55B9124F.6020501@oracle.com> + +diff --git a/src/cmd/ksh93/bltins/cd_pwd.c b/src/cmd/ksh93/bltins/cd_pwd.c +index 0735be9..ed544bf 100644 +--- a/src/cmd/ksh93/bltins/cd_pwd.c ++++ b/src/cmd/ksh93/bltins/cd_pwd.c +@@ -191,7 +191,7 @@ success: + if(*dir != '/') + return(0); + nv_putval(opwdnod,oldpwd,NV_RDONLY); +- if(oldpwd) ++ if(oldpwd && (oldpwd!=e_dot)) + free(oldpwd); + flag = strlen(dir); + /* delete trailing '/' */