[SteGUI] Add patch to build with -Werror=format-security
Pierre-YvesChibon
pingou at fedoraproject.org
Wed Dec 4 15:43:42 UTC 2013
commit 8b88e4269924009bc65a8c94a07a785f0fef92b8
Author: Pierre-Yves Chibon <pingou at pingoured.fr>
Date: Wed Dec 4 16:43:30 2013 +0100
Add patch to build with -Werror=format-security
...Use-fprintf-with-s-to-print-the-arguments.patch | 32 ++++++++++++++++++++
SteGUI.spec | 11 +++++-
2 files changed, 41 insertions(+), 2 deletions(-)
---
diff --git a/0001-Use-fprintf-with-s-to-print-the-arguments.patch b/0001-Use-fprintf-with-s-to-print-the-arguments.patch
new file mode 100644
index 0000000..96f49e9
--- /dev/null
+++ b/0001-Use-fprintf-with-s-to-print-the-arguments.patch
@@ -0,0 +1,32 @@
+From 507d0ac8c753e0ed068846803c6b6d8b7ac3ad0f Mon Sep 17 00:00:00 2001
+From: Pierre-Yves Chibon <pingou at pingoured.fr>
+Date: Wed, 4 Dec 2013 16:38:15 +0100
+Subject: [PATCH] Use fprintf() with "%s" to print the arguments
+
+---
+ src/Player.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Player.c b/src/Player.c
+index 8ec1202..6550e2a 100644
+--- a/src/Player.c
++++ b/src/Player.c
+@@ -113,13 +113,13 @@ typedef struct
+ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+ #define error(...) do {\
+ fprintf(stderr, "%s: %s:%d: ", command, __FUNCTION__, __LINE__); \
+- fprintf(stderr, __VA_ARGS__); \
++ fprintf(stderr, "%s", __VA_ARGS__); \
+ putc('\n', stderr); \
+ } while (0)
+ #else
+ #define error(args...) do {\
+ fprintf(stderr, "%s: %s:%d: ", command, __FUNCTION__, __LINE__); \
+- fprintf(stderr, ##args); \
++ fprintf(stderr, "%s", ##args); \
+ putc('\n', stderr); \
+ } while (0)
+ #endif
+--
+1.8.3.1
+
diff --git a/SteGUI.spec b/SteGUI.spec
index bd186ef..32b628c 100644
--- a/SteGUI.spec
+++ b/SteGUI.spec
@@ -1,6 +1,6 @@
Name: SteGUI
Version: 0.0.1
-Release: 26%{?dist}
+Release: 27%{?dist}
Summary: Graphical front-end to Steghide
Summary(fr): Interface graphique pour Steghide
@@ -10,6 +10,7 @@ URL: http://stegui.sourceforge.net/
Source0: http://downloads.sourceforge.net/stegui/%{name}-%{version}.tar.bz2
Source1: %{name}.desktop
Source2: %{name}-icon.png
+Patch1: 0001-Use-fprintf-with-s-to-print-the-arguments.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: fltk-devel
@@ -37,9 +38,11 @@ utilisés comme couverture.
sed -i -e 's/#include "MsgWindow.h"/#include "MsgWindow.h" \n#include <cstdlib>/' src/MsgWindow.cc
sed -i -e s'|LDFLAGS=`fltk-config --use-images --ldflags` -lasound -lm -lpthread|LDFLAGS=`fltk-config --use-images --ldflags` -lasound -lm -lpthread -ljpeg|' Makefile
+%patch1 -p1 -b .
+
%build
make CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" all
-
+
%install
rm -rf $RPM_BUILD_ROOT
@@ -75,6 +78,10 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/pixmaps/%{name}-icon.png
%changelog
+* Wed Dec 03 2013 Pierre-Yves Chibon <pingou at pingoured.fr> - 0.0.1-27
+- Add patch1 to fix build with -Werror=format-security
+- Fixes RHBZ#1037340
+
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0.1-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list