[zasx] Fix FTBFS (rhbz#1037410)

Hans de Goede jwrdegoede at fedoraproject.org
Mon Jun 16 19:37:07 UTC 2014


commit 051cd0db89ac6ae7bf585bb80ac53d55336aed18
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Mon Jun 16 21:36:54 2014 +0200

    Fix FTBFS (rhbz#1037410)

 zasx-1.30-format-security.patch |   48 +++++++++++++++++++++++++++++++++++++++
 zasx.spec                       |    7 +++++-
 2 files changed, 54 insertions(+), 1 deletions(-)
---
diff --git a/zasx-1.30-format-security.patch b/zasx-1.30-format-security.patch
new file mode 100644
index 0000000..aa07b70
--- /dev/null
+++ b/zasx-1.30-format-security.patch
@@ -0,0 +1,48 @@
+diff -up Zasx/src/gamemenu.c~ Zasx/src/gamemenu.c
+--- Zasx/src/gamemenu.c~	2014-06-16 21:29:36.000000000 +0200
++++ Zasx/src/gamemenu.c	2014-06-16 21:31:41.057900628 +0200
+@@ -370,8 +370,8 @@ void DoMenu() {
+ 				for (i = 2; i < 7; i++)
+ 					sprintf(ControlItems[i], ConfigKeyName[i], get_input_name(dev, KeyConfig[i - 2], buf, 14));
+ 
+-				sprintf(ControlItems[7], ConfigKeyName[7]);
+-				sprintf(ControlItems[8], ConfigKeyName[8]);
++				sprintf(ControlItems[7], "%s", ConfigKeyName[7]);
++				sprintf(ControlItems[8], "%s", ConfigKeyName[8]);
+ 				
+ 				CurMenu = 2;
+ 			}
+@@ -395,8 +395,8 @@ void DoMenu() {
+ 				for (i = 2; i < 7; i++)
+ 					sprintf(ControlItems[i], ConfigKeyName[i], get_input_name(dev, KeyConfig[i - 2], buf, 14));
+ 
+-				sprintf(ControlItems[7], ConfigKeyName[7]);
+-				sprintf(ControlItems[8], ConfigKeyName[8]);
++				sprintf(ControlItems[7], "%s", ConfigKeyName[7]);
++				sprintf(ControlItems[8], "%s", ConfigKeyName[8]);
+ 
+ 				CurMenu = 2;
+ 
+@@ -483,8 +483,8 @@ void DoMenu() {
+ 				for (i = 2; i < 7; i++)
+ 					sprintf(ControlItems[i], ConfigKeyName[i], get_input_name(ConfigDevice, KeyConfig[i - 2], buf, 14));
+ 
+-				sprintf(ControlItems[7], ConfigKeyName[7]);
+-				sprintf(ControlItems[8], ConfigKeyName[8]);
++				sprintf(ControlItems[7], "%s", ConfigKeyName[7]);
++				sprintf(ControlItems[8], "%s", ConfigKeyName[8]);
+ 			}
+ 		}
+ 		else if (CurMenu == 3) {
+diff -up Zasx/src/log.c~ Zasx/src/log.c
+--- Zasx/src/log.c~	2001-08-02 01:37:38.000000000 +0200
++++ Zasx/src/log.c	2014-06-16 21:30:46.019232946 +0200
+@@ -26,7 +26,7 @@ void Log(const char *format, ...) {
+ 	memset(indent, '\t', LogIndent);
+ 	indent[LogIndent] = 0;
+ 
+-	fprintf(f, indent);
++	fprintf(f, "%s", indent);
+ 	vfprintf(f, format, args);
+ 
+ 	fflush(f);
diff --git a/zasx.spec b/zasx.spec
index 5cebfb4..1a3f4dd 100644
--- a/zasx.spec
+++ b/zasx.spec
@@ -1,6 +1,6 @@
 Name:           zasx
 Version:        1.30
-Release:        16%{?dist}
+Release:        17%{?dist}
 Summary:        Asteroid like game with powerups
 Group:          Amusements/Games
 License:        GPLv2+ and Freely redistributable without restriction
@@ -9,6 +9,7 @@ Source0:        http://www.bob.allegronetwork.com/zasx/zasx130s.zip
 Source1:        zasx.desktop
 Patch0:         zasx-1.30-fixes.patch
 Patch1:         zasx-1.30-datadir.patch
+Patch2:         zasx-1.30-format-security.patch
 BuildRequires:  dumb-devel ImageMagick desktop-file-utils
 Requires:       hicolor-icon-theme
 
@@ -22,6 +23,7 @@ mode, joystick, music and sound.
 %setup -q -n Zasx
 %patch0 -p1 -z .fix
 %patch1 -p1 -z .datadir
+%patch2 -p1
 sed -i 's/\r//' copying.txt readme.txt docs/index.html docs/%{name}.css
 mv docs html
 
@@ -67,6 +69,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Mon Jun 16 2014 Hans de Goede <hdegoede at redhat.com> - 1.30-17
+- Fix FTBFS (rhbz#1037410)
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.30-16
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list