diff --git a/tcsh-6.18.01-blk_buf.patch b/tcsh-6.18.01-blk_buf.patch new file mode 100644 index 0000000..ad6c28c --- /dev/null +++ b/tcsh-6.18.01-blk_buf.patch @@ -0,0 +1,21 @@ +--- tc.str.c ++++ tc.str.c 2012-05-10 07:57:01.358065084 +0000 +@@ -590,10 +590,14 @@ bb_cleanup(void *xbb) + struct blk_buf *bb; + size_t i; + +- bb = xbb; +- for (i = 0; i < bb->len; i++) +- xfree(bb->vec[i]); +- xfree(bb->vec); ++ bb = (struct blk_buf *)xbb; ++ if (bb->vec) { ++ for (i = 0; i < bb->len; i++) ++ xfree(bb->vec[i]); ++ xfree(bb->vec); ++ } ++ bb->vec = (Char**)0; ++ bb->len = 0; + } + + void diff --git a/tcsh.changes b/tcsh.changes index 23d5390..006930a 100644 --- a/tcsh.changes +++ b/tcsh.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 10 08:00:39 UTC 2012 - werner@suse.de + +- Fix tcsh segfaults in bb_cleanup() (bnc#761353) + ------------------------------------------------------------------- Fri Feb 24 14:46:45 UTC 2012 - werner@suse.de diff --git a/tcsh.spec b/tcsh.spec index c9855a4..58f6bad 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -1,5 +1,5 @@ # -# spec file for package tcsh (Version 6.18.00) +# spec file for package tcsh # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -15,22 +15,20 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: tcsh BuildRequires: ncurses-devel Url: http://www.tcsh.org/ -License: BSD-3-Clause -Group: System/Shells -Requires: gawk textutils +Requires: gawk +Requires: textutils %if %suse_version > 1020 Recommends: tcsh-lang = 6.18.00 %endif -AutoReqProv: on Version: 6.18.00 -Release: 1 +Release: 0 Summary: The C SHell +License: BSD-3-Clause +Group: System/Shells Source: ftp.astron.com:/pub/tcsh/tcsh-6.18.00.tar.gz Source2: bindkey.tcsh Source3: complete.tcsh @@ -41,6 +39,7 @@ Patch3: tcsh-6.15.00-blanks.dif Patch4: tcsh-6.17.03-colorls.dif Patch5: tcsh-6.17.06-dspmbyte.dif Patch6: tcsh-6.17.10-catalogs.dif +Patch7: tcsh-6.18.01-blk_buf.patch Patch42: tcsh-6.18.01.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -59,7 +58,6 @@ Authors: Scott Krotz %package -n tcsh-lang -License: BSD-3-Clause Summary: Languages for package tcsh Group: System/Localization Provides: tcsh-lang = %{version} @@ -78,6 +76,7 @@ Provides translations to the package tcsh %patch4 -p0 -b .colorls %patch5 -p0 -b .dspmbyte %patch6 -p0 -b .catalogs +%patch7 -p0 -b .blk_buf %patch -b .0 %build