[perl-eperl] Fix format-security compiler warnings

Petr Pisar ppisar at fedoraproject.org
Tue May 13 13:54:33 UTC 2014


commit 3d4715eeb84d518e25828c55aa5b73a908a5d188
Author: Petr Písař <ppisar at redhat.com>
Date:   Tue May 13 15:51:53 2014 +0200

    Fix format-security compiler warnings

 ....14-Fix-format-security-compiler-warnings.patch |   53 ++++++++++++++++++++
 perl-eperl.spec                                    |    8 +++-
 2 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/eperl-2.2.14-Fix-format-security-compiler-warnings.patch b/eperl-2.2.14-Fix-format-security-compiler-warnings.patch
new file mode 100644
index 0000000..41b7346
--- /dev/null
+++ b/eperl-2.2.14-Fix-format-security-compiler-warnings.patch
@@ -0,0 +1,53 @@
+From f97b4b836298245e8631ad942d788f3d0a1c3c54 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Tue, 13 May 2014 15:47:50 +0200
+Subject: [PATCH] Fix format-security compiler warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Compilation by GCC with -Wall -Werror=format-security flags raises few
+errors. This patch fixes them.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1058664
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ eperl_main.c  | 4 ++--
+ eperl_perl5.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/eperl_main.c b/eperl_main.c
+index e998607..6747cf7 100644
+--- a/eperl_main.c
++++ b/eperl_main.c
+@@ -150,12 +150,12 @@ void give_version(void)
+ 
+ void give_readme(void)
+ {
+-    fprintf(stdout, ePerl_README);
++    fputs(ePerl_README, stdout);
+ }
+ 
+ void give_license(void)
+ {
+-    fprintf(stdout, ePerl_LICENSE);
++    fputs(ePerl_LICENSE, stdout);
+ }
+ 
+ void give_img_logo(void)
+diff --git a/eperl_perl5.c b/eperl_perl5.c
+index d1a981a..045d8cb 100644
+--- a/eperl_perl5.c
++++ b/eperl_perl5.c
+@@ -212,7 +212,7 @@ int Perl5_Run(int myargc, char **myargv, int mode, int fCheck, int keepcwd, char
+             IO_restore_stdout();
+             IO_restore_stderr();
+             if ((cpBuf = ePerl_ReadErrorFile(perlstderr, perlscript, source)) != NULL) {
+-                fprintf(stderr, cpBuf);
++                fputs(cpBuf, stderr);
+             }
+             CU(EX_FAIL);
+         }
+-- 
+1.9.0
+
diff --git a/perl-eperl.spec b/perl-eperl.spec
index b1e29f5..adc87b6 100644
--- a/perl-eperl.spec
+++ b/perl-eperl.spec
@@ -1,6 +1,6 @@
 Name:           perl-eperl
 Version:        2.2.14
-Release:        25%{?dist}
+Release:        26%{?dist}
 Summary:        Embedded Perl Language
 License:        GPL+ or Artistic
 Group:          Development/Libraries
@@ -8,6 +8,8 @@ URL:            http://www.ossp.org/pkg/tool/eperl/
 Source0:        ftp://ftp.ossp.org/pkg/tool/eperl/eperl-%{version}.tar.gz
 Patch0:         http://ftp.debian.org/pool/main/e/eperl/eperl_2.2.14-15.1.diff.gz
 Patch1:         perl-eperl-5.16compat.patch
+# Fix format-security compiler warnings, bug #1058664
+Patch2:         eperl-2.2.14-Fix-format-security-compiler-warnings.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  gdbm-devel
 BuildRequires:  libdb-devel
@@ -33,6 +35,7 @@ which is designed for mod_perl 1.x.
 %setup -q -n eperl-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 chmod u+x etc/shtool
 find contrib/utils -perm /0100 -type f -exec chmod 644 {} \;
 
@@ -78,6 +81,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/*
 
 %changelog
+* Tue May 13 2014 Petr Pisar <ppisar at redhat.com> - 2.2.14-26
+- Fix format-security compiler warnings (bug #1058664)
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2.14-25
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list