From 1ebe2350e498fc30d4da267646dd832662da69bf3fa032fbc1a02d5569ffb0d4 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Mon, 27 Jun 2022 09:45:07 +0000 Subject: [PATCH] Accepting request 984207 from home:dspinella:branches:Archiving - Remove FORTIFY_SOURCE=3 as it triggers a buffer overflow, fixes bsc#1200712 OBS-URL: https://build.opensuse.org/request/show/984207 OBS-URL: https://build.opensuse.org/package/show/Archiving/zip?expand=0&rev=22 --- zip.changes | 6 ++++++ zip.spec | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/zip.changes b/zip.changes index 00aa057..ddb17ec 100644 --- a/zip.changes +++ b/zip.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 21 14:35:28 UTC 2022 - Danilo Spinella + +- Remove FORTIFY_SOURCE=3 as it triggers a buffer overflow, + fixes bsc#1200712 + ------------------------------------------------------------------- Sun Feb 13 08:37:38 UTC 2022 - Bernhard Wiedemann diff --git a/zip.spec b/zip.spec index 04a31bf..46afa74 100644 --- a/zip.spec +++ b/zip.spec @@ -1,7 +1,7 @@ # # spec file for package zip # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -23,7 +23,7 @@ Release: 0 Summary: File compression program License: BSD-3-Clause Group: Productivity/Archiving/Compression -Url: https://github.com/distropatches/zip/commits/opensuse +URL: https://github.com/distropatches/zip/commits/opensuse Source: http://downloads.sourceforge.net/project/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz Patch2: zip-3.0-iso8859_2.patch Patch3: zip-3.0-add_options_to_help.patch @@ -61,7 +61,9 @@ PKZIP(tm) 2.04g (Phil Katz ZIP) for MS-DOS systems. %patch12 -p1 %build -make %{?_smp_mflags} -f unix/Makefile prefix=/usr CC="gcc %{optflags} -DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" generic_gcc +# Remove FORTIFY_SOURCE=3 for bsc#1200712 +EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g') -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" +make %{?_smp_mflags} -f unix/Makefile prefix=/usr CC="gcc $EXTRA_CFLAGS -DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" generic_gcc %install mkdir -p %{buildroot}%{_prefix}/bin