mhlavink pushed to ksh (master). "using trap DEBUG could cause segmentation fault"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 7 16:17:56 UTC 2015


>From 52585b50c01ae2d7e47000ffe837e44d21d6261e Mon Sep 17 00:00:00 2001
From: Michal Hlavinka <mhlavink at redhat.com>
Date: Tue, 7 Apr 2015 18:17:49 +0200
Subject: using trap DEBUG could cause segmentation fault


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..77246e8 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:      25%{?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,7 @@ Patch60: ksh-20120801-trapcom.patch
 
 # for ksh <= 2013-04-09, rhbz#960371
 Patch61: ksh-20120801-lexfix.patch
+Patch62: ksh-20140801-arraylen.patch
 
 BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Conflicts:    pdksh
@@ -215,6 +216,7 @@ with "sh" (the Bourne Shell).
 %patch59 -p1 -b .safefd
 %patch60 -p1 -b .trapcom
 %patch61 -p1 -b .lexfix
+%patch62 -p1 -b .arraylen
 
 #/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 +320,9 @@ fi
     rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* 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=master&id=52585b50c01ae2d7e47000ffe837e44d21d6261e


More information about the scm-commits mailing list