diff --git a/ksh-20110630-ddotfix.patch b/ksh-20110630-ddotfix.patch new file mode 100644 index 0000000..5dc7734 --- /dev/null +++ b/ksh-20110630-ddotfix.patch @@ -0,0 +1,12 @@ +diff -up ksh-20110630/src/cmd/ksh93/include/nval.h.ddotfix ksh-20110630/src/cmd/ksh93/include/nval.h +--- ksh-20110630/src/cmd/ksh93/include/nval.h.ddotfix 2011-12-07 14:31:31.793236351 +0100 ++++ ksh-20110630/src/cmd/ksh93/include/nval.h 2011-12-07 14:32:26.357677922 +0100 +@@ -198,7 +198,7 @@ struct Namval + + /* name-value pair macros */ + #define nv_isattr(np,f) ((np)->nvflag & (f)) +-#define nv_onattr(n,f) ((n)->nvflag |= (f)) ++#define nv_onattr(n,f) ((n)?((n)->nvflag |= (f)):(f)) + #define nv_offattr(n,f) ((n)->nvflag &= ~(f)) + #define nv_isarray(np) (nv_isattr((np),NV_ARRAY)) + diff --git a/ksh.spec b/ksh.spec index a4f893b..0fdba52 100644 --- a/ksh.spec +++ b/ksh.spec @@ -6,7 +6,7 @@ URL: http://www.kornshell.com/ Group: System Environment/Shells License: CPL Version: 20110630 -Release: 7%{?dist} +Release: 8%{?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 Source3: kshrc.rhs @@ -32,6 +32,8 @@ Patch6: ksh-20110630-joblimit.patch Patch7: ksh-20110630-dontstop.patch +Patch8: ksh-20110630-ddotfix.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Conflicts: pdksh Requires: coreutils, glibc-common, diffutils @@ -57,6 +59,7 @@ with "sh" (the Bourne Shell). %patch5 -p1 -b .tmoutfix %patch6 -p1 -b .joblimit %patch7 -p1 -b .dontstop +%patch8 -p1 -b .ddotfix #/dev/fd test does not work because of mock sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options @@ -142,6 +145,9 @@ fi rm -rf $RPM_BUILD_ROOT %changelog +* Wed Dec 07 2011 Michal Hlavinka - 20110630-8 +- do not crash when two subseguent dots are used in variable or command name (#733544) + * Mon Dec 05 2011 Michal Hlavinka - 20110630-7 - fix: ksh can prematurely exit without crash or any error - make spec work in epel