diff --git a/ksh-20120801-argvfix.patch b/ksh-20120801-argvfix.patch new file mode 100644 index 0000000..b0e1a78 --- /dev/null +++ b/ksh-20120801-argvfix.patch @@ -0,0 +1,13 @@ +diff -up ksh-20120801/src/cmd/ksh93/sh/main.c.fixargs ksh-20120801/src/cmd/ksh93/sh/main.c +--- ksh-20120801/src/cmd/ksh93/sh/main.c.fixargs 2013-12-31 11:32:14.917874134 +0100 ++++ ksh-20120801/src/cmd/ksh93/sh/main.c 2013-12-31 11:32:58.028847126 +0100 +@@ -757,7 +757,7 @@ static void fixargs(char **argv, int mod + offset += size; + buff[offset++] = ' '; + } +- buff[offset-1] = 0; ++ memset(&buff[offset - 1], 0, command_len - offset + 1); + # ifdef PSTAT + un.pst_command = stakptr(0); + pstat(PSTAT_SETCMD,un,0,0,0); + diff --git a/ksh.spec b/ksh.spec index 8bd8479..c9eb5da 100644 --- a/ksh.spec +++ b/ksh.spec @@ -6,7 +6,7 @@ URL: http://www.kornshell.com/ Group: System Environment/Shells License: EPL Version: 20120801 -Release: 12%{?dist} +Release: 13%{?dist} Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz Source2: kshcomp.conf @@ -28,6 +28,7 @@ Patch7: ksh-20130214-fixkill.patch Patch8: ksh-20120801-kshmfix.patch Patch9: ksh-20120801-memlik.patch Patch10: ksh-20120801-mtty.patch +Patch11: ksh-20120801-argvfix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Conflicts: pdksh @@ -57,6 +58,7 @@ with "sh" (the Bourne Shell). %patch8 -p1 -b .kshmfix %patch9 -p1 -b .memlik %patch10 -p1 -b .mtty +%patch11 -p1 -b .argvfix #/dev/fd test does not work because of mock sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options @@ -151,6 +153,9 @@ fi rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jan 06 2014 Michal Hlavinka - 20120801-13 +- fix argv rewrite (#1047508) + * Wed Oct 30 2013 Michal Hlavinka - 20120801-12 - ksh stops on read when monitor mode is enabled @@ -397,7 +402,7 @@ fi * Wed Feb 25 2009 Fedora Release Engineering - 20081104-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild -* Tue Jan 21 2009 Michal Hlavinka 20081104-1 +* Wed Jan 21 2009 Michal Hlavinka 20081104-1 - update to 2008-11-04 - ast-ksh-locales are not useable remove them