[rafkill] Fix format-security FTBFS.

Jon Ciesla limb at fedoraproject.org
Mon Feb 10 19:21:50 UTC 2014


commit 991fef70738d13f45d6559480be3e1387cc0877f
Author: Jon Ciesla <limburgher at gmail.com>
Date:   Mon Feb 10 13:20:06 2014 -0600

    Fix format-security FTBFS.

 rafkill-printf-format.patch |   20 ++++++++++++++++++++
 rafkill.spec                |    7 ++++++-
 2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/rafkill-printf-format.patch b/rafkill-printf-format.patch
new file mode 100644
index 0000000..c2b10af
--- /dev/null
+++ b/rafkill-printf-format.patch
@@ -0,0 +1,20 @@
+--- src/defs.cpp~	2006-08-30 19:16:04.000000000 -0500
++++ src/defs.cpp	2014-02-10 13:06:28.606106763 -0600
+@@ -100,7 +100,7 @@
+ }
+ 
+ void Util::alert( const char * message ){
+-	allegro_message( message );
++	allegro_message( "%s", message );
+ }
+ 
+ void Util::scramble( char * scram, const int m ) {
+@@ -300,7 +300,7 @@
+ }
+ 
+ void Util::getDataPath( char * buffer, const char * file ){
+-	sprintf( buffer, (getInstallDirectory() + "data").c_str() );
++	sprintf( buffer, "%s", (getInstallDirectory() + "data").c_str() );
+ 	put_backslash( buffer );
+ 	strcat( buffer, file );
+ }
diff --git a/rafkill.spec b/rafkill.spec
index 1d28093..30da09b 100644
--- a/rafkill.spec
+++ b/rafkill.spec
@@ -1,6 +1,6 @@
 Name:           rafkill
 Version:        1.2.3
-Release:        12%{?dist}
+Release:        13%{?dist}
 Summary:        Top-down shooter with powerups
 Group:          Amusements/Games
 License:        GPLv2
@@ -12,6 +12,7 @@ Source3:        rafkill.png
 Patch0:         rafkill-1.2.2-shatter-crash.patch
 Patch1:         rafkill-1.2.2-gcc43.patch
 Patch2:		rafkill-1.2.3-gcc470.patch
+Patch3:		rafkill-printf-format.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  allegro-devel dumb-devel scons desktop-file-utils
 Requires:       hicolor-icon-theme
@@ -27,6 +28,7 @@ powerups or even a complete new ship with the points you've earned sofar.
 %patch0 -p1 -z .shatter
 %patch1 -p1 -z .gcc43
 %patch2 -p0 -z .gcc470
+%patch3 -p0 -z .format
 # sigh hack hack hack
 FLAGS=""
 for i in $RPM_OPT_FLAGS; do
@@ -91,6 +93,9 @@ fi
 
 
 %changelog
+* Mon Feb 10 2014 Jon Ciesla <limburgher at gmail.com> - 1.2.3-13
+- Fix format-security FTBFS, BZ 1037300.
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.3-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list