mhlavink pushed to ksh (f22). "do not crash, when disk is full, report an error (#1212994)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Wed May 6 09:48:14 UTC 2015
>From e26e49f939a590d4ac373f8a5e754f4789b0d26e Mon Sep 17 00:00:00 2001
From: Michal Hlavinka <mhlavink at redhat.com>
Date: Wed, 6 May 2015 11:48:06 +0200
Subject: do not crash, when disk is full, report an error (#1212994)
diff --git a/ksh-20120801-diskfull.patch b/ksh-20120801-diskfull.patch
new file mode 100644
index 0000000..9d68d93
--- /dev/null
+++ b/ksh-20120801-diskfull.patch
@@ -0,0 +1,20 @@
+--- ksh-20120801/src/cmd/ksh93/sh/main.c 2015-04-17 16:55:57.802048900 -0300
++++ ksh-20120801/src/cmd/ksh93/sh/main.c 2015-04-17 17:10:45.276129709 -0300
+@@ -423,7 +423,7 @@ static void exfile(register Shell_t *shp
+ sfsync(shp->outpool);
+ shp->st.execbrk = shp->st.breakcnt = 0;
+ /* check for return from profile or env file */
+- if(sh_isstate(SH_PROFILE) && (jmpval==SH_JMPFUN || jmpval==SH_JMPEXIT))
++ if(sh_isstate(SH_PROFILE) && (jmpval==SH_JMPFUN || jmpval==SH_JMPEXIT || jmpval==SH_JMPERREXIT))
+ {
+ sh_setstate(states);
+ goto done;
+@@ -600,6 +600,8 @@ done:
+ siglongjmp(*shp->jmplist,jmpval);
+ else if(jmpval == SH_JMPEXIT)
+ sh_done(shp,0);
++ else if(jmpval == SH_JMPERREXIT)
++ sh_done(shp,-1);
+ if(fno>0)
+ sh_close(fno);
+ if(shp->st.filename)
diff --git a/ksh-20140801-arraylen.patch b/ksh-20140801-arraylen.patch
new file mode 100644
index 0000000..34c9b6b
--- /dev/null
+++ b/ksh-20140801-arraylen.patch
@@ -0,0 +1,11 @@
+--- ksh-20120801/src/cmd/ksh93/sh/xec.c 2015-04-02 10:55:26.228017873 -0400
++++ ksh-20120801/src/cmd/ksh93/sh/xec.c 2015-04-02 10:56:04.099017700 -0400
+@@ -1234,7 +1234,7 @@ int sh_exec(register const Shnode_t *t,
+ if((io||argn))
+ {
+ Shbltin_t *bp=0;
+- static char *argv[1];
++ static char *argv[2];
+ int tflags = 1;
+ if(np && nv_isattr(np,BLT_DCL))
+ tflags |= 2;
diff --git a/ksh.spec b/ksh.spec
index 875bb4d..a6295ad 100644
--- a/ksh.spec
+++ b/ksh.spec
@@ -9,7 +9,7 @@ Group: System Environment/Shells
#CPL everywhere else (for KSH itself)
License: CPL
Version: %{releasedate}
-Release: 24%{?dist}
+Release: 26%{?dist}
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz
Source2: kshcomp.conf
@@ -149,6 +149,8 @@ Patch60: ksh-20120801-trapcom.patch
# for ksh <= 2013-04-09, rhbz#960371
Patch61: ksh-20120801-lexfix.patch
+Patch62: ksh-20140801-arraylen.patch
+Patch63: ksh-20120801-diskfull.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Conflicts: pdksh
@@ -215,6 +217,8 @@ with "sh" (the Bourne Shell).
%patch59 -p1 -b .safefd
%patch60 -p1 -b .trapcom
%patch61 -p1 -b .lexfix
+%patch62 -p1 -b .arraylen
+%patch63 -p1 -b .diskfull
#/dev/fd test does not work because of mock
sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options
@@ -318,6 +322,12 @@ fi
rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed May 06 2015 Michal Hlavinka <mhlavink at redhat.com> - 20120801-26
+- do not crash, when disk is full, report an error (#1212994)
+
+* Tue Apr 07 2015 Michal Hlavinka <mhlavink at redhat.com> - 20120801-25
+- using trap DEBUG could cause segmentation fault
+
* Mon Mar 30 2015 Michal Hlavinka <mhlavink at redhat.com> - 20120801-24
- cd builtin could break IO redirection
- fix segfault when handling a trap
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/ksh.git/commit/?h=f22&id=e26e49f939a590d4ac373f8a5e754f4789b0d26e
More information about the scm-commits
mailing list