[perl-IPTables-libiptc] Fix GCC format-security warning
Petr Pisar
ppisar at fedoraproject.org
Tue Jun 10 05:52:46 UTC 2014
commit c44831b731749548c121178f481e690b4fe2bbc9
Author: Petr Písař <ppisar at redhat.com>
Date: Tue Jun 10 07:41:06 2014 +0200
Fix GCC format-security warning
...iptc-0.52-Fix-GCC-format-security-warning.patch | 40 ++++++++++++++++++++
perl-IPTables-libiptc.spec | 8 +++-
2 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/IPTables-libiptc-0.52-Fix-GCC-format-security-warning.patch b/IPTables-libiptc-0.52-Fix-GCC-format-security-warning.patch
new file mode 100644
index 0000000..b7ebc46
--- /dev/null
+++ b/IPTables-libiptc-0.52-Fix-GCC-format-security-warning.patch
@@ -0,0 +1,40 @@
+From 61d08deaa4ac71102057c17df2b1ee44ebafec02 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Tue, 10 Jun 2014 07:31:52 +0200
+Subject: [PATCH] Fix GCC format-security warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+RT#96352
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ libiptc.xs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libiptc.xs b/libiptc.xs
+index 313f746..ad36496 100644
+--- a/libiptc.xs
++++ b/libiptc.xs
+@@ -313,7 +313,7 @@ list_rules_IPs(self, type, chain)
+ /* Parse what type was requested */
+ if (strcasecmp(type, "dst") == 0) the_type = 'd';
+ else if (strcasecmp(type, "src") == 0) the_type = 's';
+- else croak(errmsg);
++ else croak("%s", errmsg);
+
+ while(entry) {
+ count++;
+@@ -331,7 +331,7 @@ list_rules_IPs(self, type, chain)
+ sv = newSVpv(buf, 0);
+ break;
+ default:
+- croak(errmsg);
++ croak("%s", errmsg);
+ }
+ XPUSHs(sv_2mortal(sv));
+ }
+--
+1.9.3
+
diff --git a/perl-IPTables-libiptc.spec b/perl-IPTables-libiptc.spec
index 127f083..b70c503 100644
--- a/perl-IPTables-libiptc.spec
+++ b/perl-IPTables-libiptc.spec
@@ -1,6 +1,6 @@
Name: perl-IPTables-libiptc
Version: 0.52
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: Perl extension for iptables libiptc
License: GPLv2+
Group: Development/Libraries
@@ -12,6 +12,8 @@ Patch0: %{name}-0.51-Support-iptables-1.4.12.patch
Patch1: IPTables-libiptc-0.52-Support-for-1.4.16.2.patch
# RT#70639, bug #992659
Patch2: IPTables-libiptc-0.52-Support-for-1.4.18.patch
+# croak() expects formatting string, bug #1106081
+Patch3: IPTables-libiptc-0.52-Fix-GCC-format-security-warning.patch
BuildRequires: iptables-devel >= 1.4.4
BuildRequires: perl
BuildRequires: perl(ExtUtils::MakeMaker)
@@ -34,6 +36,7 @@ library libiptc.
%patch0 -p1 -b .1412
%patch1 -p1 -b .1416
%patch2 -p1 -b .1418
+%patch3 -p1
%build
perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
@@ -55,6 +58,9 @@ make test
%{_mandir}/man3/*
%changelog
+* Tue Jun 10 2014 Petr Pisar <ppisar at redhat.com> - 0.52-9
+- Fix GCC format-security warning (bug #1106081)
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.52-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list