[qt-qsa] Fix FTBFS with -Werror=format-security (#1106983)

Yaakov Selkowitz yselkowitz at fedoraproject.org
Tue Jul 8 02:57:40 UTC 2014


commit f87a7189d2a28de414666476f8bb24c1b9699406
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date:   Fri Jun 13 14:56:26 2014 -0500

    Fix FTBFS with -Werror=format-security (#1106983)

 qt-qsa-1.1.5-format-security.patch |   26 ++++++++++++++++++++++++++
 qt-qsa.spec                        |    7 ++++++-
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/qt-qsa-1.1.5-format-security.patch b/qt-qsa-1.1.5-format-security.patch
new file mode 100644
index 0000000..a6359c6
--- /dev/null
+++ b/qt-qsa-1.1.5-format-security.patch
@@ -0,0 +1,26 @@
+diff --git a/configure2/main.cpp b/configure2/main.cpp
+index e9b10bc..ee337fa 100644
+--- a/configure2/main.cpp
++++ b/configure2/main.cpp
+@@ -43,7 +43,7 @@ static const char *app = 0;
+ 
+ static void dumpMessages()
+ {
+-    qWarning( messages().join( "\n" ) );
++    qWarning( "%s", messages().join( "\n" ).ascii() );
+ }
+ 
+ 
+diff --git a/src/ide/idewindow.ui.h b/src/ide/idewindow.ui.h
+index 59a17dc..01f7195 100644
+--- a/src/ide/idewindow.ui.h
++++ b/src/ide/idewindow.ui.h
+@@ -61,7 +61,7 @@ void debugMessageOutput( QtMsgType type, const char *msg )
+ 	    debugoutput->append(QString::fromLatin1( fix_string(msg) )
+                                  + QString::fromLatin1("\n") );
+     } else {
+-	fprintf( stderr, msg );
++	fprintf( stderr, "%s", msg );
+ 	abort();
+     }
+     qApp->flush();
diff --git a/qt-qsa.spec b/qt-qsa.spec
index bbd0665..044b8f0 100644
--- a/qt-qsa.spec
+++ b/qt-qsa.spec
@@ -4,13 +4,14 @@
 
 Name:           qt-qsa
 Version:        1.1.5
-Release:        13%{?dist}
+Release:        14%{?dist}
 Summary:        QT Script for Applications
 
 Group:          Development/Libraries
 License:        GPLv2
 URL:            http://www.trolltech.com/products/qt/addon/qsa
 Source0:        ftp://ftp.trolltech.com/qsa/source/qsa-x11-free-%{version}.tar.gz
+Patch0:         qt-qsa-1.1.5-format-security.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  qt3-devel
@@ -30,6 +31,7 @@ This package contains development files and the documentation
 
 %prep
 %setup -q -n qsa-x11-free-%{version}
+%patch0 -p1
 
 #fix LICENSE.GPL and README permissions
 chmod 644 LICENSE.GPL
@@ -94,6 +96,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Jun 13 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 1.1.5-14
+- Fix FTBFS with -Werror=format-security (#1106983)
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.5-13
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list