ebf9b31727
- do not resend signal on termination (#1092132) - fix brace expansion on/off - fix incorrect rounding of numsers 0.5 < |x| <1.0 in printf (#1080940) - fix parser errors related to the end of the here-document marker - ksh hangs when command substitution fills out the pipe buffer - using typeset -l with a restricted variabled caused segmentation fault - monitor mode was documented incorrectly - do not crash when unsetting running function from another one (#1105139) - should report an error when trying to cd into directory without execution bit - job locking mechanism did not survive compiler optimization - reading a file via command substitution did not work when any of stdin, stdout or stderr were closed (#1070308) - fix lexical parser crash
59 lines
2.1 KiB
Diff
59 lines
2.1 KiB
Diff
diff -up ksh-20120801/src/cmd/ksh93/sh/init.c.covsfix ksh-20120801/src/cmd/ksh93/sh/init.c
|
|
--- ksh-20120801/src/cmd/ksh93/sh/init.c.covsfix 2013-07-22 17:41:34.674054068 +0200
|
|
+++ ksh-20120801/src/cmd/ksh93/sh/init.c 2013-07-22 17:42:50.761361921 +0200
|
|
@@ -1237,9 +1237,11 @@ static void put_mode(Namval_t* np, const
|
|
mode = *(double*)val;
|
|
}
|
|
else
|
|
+ {
|
|
mode = strperm(val, &last,0);
|
|
- if(*last)
|
|
- errormsg(SH_DICT,ERROR_exit(1),"%s: invalid mode string",val);
|
|
+ if(*last)
|
|
+ errormsg(SH_DICT,ERROR_exit(1),"%s: invalid mode string",val);
|
|
+ }
|
|
nv_putv(np,(char*)&mode,NV_INTEGER,nfp);
|
|
}
|
|
else
|
|
diff -up ksh-20120801/src/cmd/ksh93/sh/io.c.covsfix ksh-20120801/src/cmd/ksh93/sh/io.c
|
|
--- ksh-20120801/src/cmd/ksh93/sh/io.c.covsfix 2013-07-22 17:06:30.282927080 +0200
|
|
+++ ksh-20120801/src/cmd/ksh93/sh/io.c 2013-07-22 17:08:49.645721280 +0200
|
|
@@ -954,6 +954,7 @@ int sh_pipe(register int pv[])
|
|
socklen_t slen;
|
|
if ((pv[out] = socket (AF_INET, SOCK_STREAM, 0)) < 0)
|
|
errormsg(SH_DICT,ERROR_system(1),e_pipe);
|
|
+ memset(&sin.sin_zero, 0, sizeof(sin.sin_zero));
|
|
do
|
|
{
|
|
sin.sin_family = AF_INET;
|
|
diff -up ksh-20120801/src/cmd/ksh93/sh/name.c.covsfix ksh-20120801/src/cmd/ksh93/sh/name.c
|
|
--- ksh-20120801/src/cmd/ksh93/sh/name.c.covsfix 2013-07-22 17:40:31.644635604 +0200
|
|
+++ ksh-20120801/src/cmd/ksh93/sh/name.c 2013-07-22 17:41:15.828227073 +0200
|
|
@@ -3094,6 +3094,7 @@ void nv_newattr (register Namval_t *np,
|
|
if(!mp)
|
|
nv_putval (np, cp, NV_RDONLY);
|
|
free(cp);
|
|
+ cp = NULL;
|
|
}
|
|
}
|
|
while(ap && nv_nextsub(np));
|
|
diff -up ksh-20120801/src/cmd/ksh93/sh/subshell.c.covsfix ksh-20120801/src/cmd/ksh93/sh/subshell.c
|
|
--- ksh-20120801/src/cmd/ksh93/sh/subshell.c.covsfix 2013-07-22 17:46:15.607533423 +0200
|
|
+++ ksh-20120801/src/cmd/ksh93/sh/subshell.c 2013-07-22 17:48:36.739290968 +0200
|
|
@@ -205,7 +205,14 @@ void sh_subfork(void)
|
|
shp->comsub = 0;
|
|
SH_SUBSHELLNOD->nvalue.s = 0;
|
|
sp->subpid=0;
|
|
- shp->st.trapcom[0] = (comsub==2?NULL:trap);
|
|
+ if (comsub==2)
|
|
+ {
|
|
+ shp->st.trapcom[0] = NULL;
|
|
+ if(trap)
|
|
+ free((void*)trap);
|
|
+ }
|
|
+ else
|
|
+ shp->st.trapcom[0] = (comsub==2?NULL:trap);
|
|
shp->savesig = 0;
|
|
}
|
|
}
|