diff --git a/sed-dont_close_twice.patch b/sed-dont_close_twice.patch new file mode 100644 index 0000000..afc964b --- /dev/null +++ b/sed-dont_close_twice.patch @@ -0,0 +1,16 @@ +http://lists.gnu.org/archive/html/bug-gnu-utils/2014-06/msg00000.html + +Index: sed-4.2.2/sed/utils.c +=================================================================== +--- sed-4.2.2.orig/sed/utils.c ++++ sed-4.2.2/sed/utils.c +@@ -298,8 +298,8 @@ ck_fclose(stream) + { + if (!stream || stream == cur->fp) + { +- do_ck_fclose (cur->fp); + prev->link = cur->link; ++ do_ck_fclose (cur->fp); + free(cur->name); + free(cur); + } diff --git a/sed.changes b/sed.changes index 3676147..024f9e9 100644 --- a/sed.changes +++ b/sed.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jun 3 09:48:33 UTC 2014 - tcech@suse.cz + +- sed-dont_close_twice.patch (bnc#880817) + when closing fails, file is attempted to be closed again + patch based of Neil Brown's recommendation + ------------------------------------------------------------------- Fri Apr 5 12:08:28 UTC 2013 - idonmez@suse.com diff --git a/sed.spec b/sed.spec index a3b4118..230424a 100644 --- a/sed.spec +++ b/sed.spec @@ -1,7 +1,7 @@ # # spec file for package sed # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ Url: http://www.gnu.org/software/sed/ Source: ftp://ftp.gnu.org/gnu/sed/%{name}-%{version}.tar.bz2 Source1: %{name}-%{version}.tar.bz2.sig Source2: %{name}.keyring +# PATCH-FIX-SLE sed-dont_close_twice.patch bnc@880817 tcech@suse.cz -- Fix double close. +Patch: sed-dont_close_twice.patch # Use rpmbuild -D 'VERIFY_SIG 1' to verify signature during build or run one-shot check by "gpg-offline --verify --package=sed sed-*.sig". %if 0%{?VERIFY_SIG} BuildRequires: gpg-offline @@ -47,6 +49,7 @@ occurrences of a string within a file. %gpg_verify %{S:1} %endif %setup -q +%patch -p1 %build %define warn_flags -Wall -Wstrict-prototypes -Wpointer-arith -Wformat-security