17435456 setting KSH_VERSION crashes ksh93
authorTomas Klacko <tomas.klacko@oracle.com>
Mon, 13 Jan 2014 05:06:49 -0800
changeset 1635 5269c1d79ab0
parent 1634 b137bb5aa530
child 1636 d3ad0c91bf12
17435456 setting KSH_VERSION crashes ksh93
components/ksh93/Makefile
components/ksh93/patches/17435456.patch
--- a/components/ksh93/Makefile	Sat Jan 11 10:51:40 2014 -0800
+++ b/components/ksh93/Makefile	Mon Jan 13 05:06:49 2014 -0800
@@ -78,7 +78,8 @@
 					 CR7186440_ksh93_disable_predictive_editing.patch \
 					 CR7128313.patch  Bug15794787,15819673.patch \
 					 Bug15808407.patch Bug17714341.patch \
-					 17432413.patch 17824699.patch
+					 17432413.patch 17824699.patch \
+					 17435456.patch
 
 # Fixup HOSTTYPE to match uname output and bits
 HOSTTYPE32=sol11.$(shell uname -p)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/ksh93/patches/17435456.patch	Mon Jan 13 05:06:49 2014 -0800
@@ -0,0 +1,17 @@
+http://lists.research.att.com/pipermail/ast-developers/2014q1/003806.html
+
+--- a/src/cmd/ksh93/sh/init.c
++++ b/src/cmd/ksh93/sh/init.c
+@@ -1933,6 +1933,11 @@ static void env_init(Shell_t *shp)
+ 		*dp++ = 0;
+ 		if(mp = dtmatch(shp->var_base,cp))
+ 		{
++                        if(strcmp(cp,VERSIONNOD->nvname)==0)
++                        {
++                                dp[-1] = '=';
++                                continue;
++                        }
+ 			mp->nvenv = (char*)cp;
+ 			dp[-1] = '=';
+ 		}
+