[BlockOutII] Fix building with -Werror=format-security (rhbz#1037001)

Hans de Goede jwrdegoede at fedoraproject.org
Thu Dec 12 13:36:19 UTC 2013


commit 673b4f4c60aa1310187769b5440b54f3f73b1603
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Thu Dec 12 14:36:22 2013 +0100

    Fix building with -Werror=format-security (rhbz#1037001)

 BlockOutII-2.3-format-security.patch |   13 +++++++++++++
 BlockOutII.spec                      |    7 ++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/BlockOutII-2.3-format-security.patch b/BlockOutII-2.3-format-security.patch
new file mode 100644
index 0000000..e8c8e7d
--- /dev/null
+++ b/BlockOutII-2.3-format-security.patch
@@ -0,0 +1,13 @@
+diff --git a/BlockOut/PageHallOfFameOnLine.cpp b/BlockOut/PageHallOfFameOnLine.cpp
+index a91ed50..af6e2c9 100644
+--- a/BlockOut/PageHallOfFameOnLine.cpp
++++ b/BlockOut/PageHallOfFameOnLine.cpp
+@@ -60,7 +60,7 @@ void PageHallOfFameOnLine::DownloadScore() {
+   if( page==NULL ) {
+ 
+     downloadState = -1;
+-    sprintf(errMsg,mParent->GetHttp()->GetError());
++    sprintf(errMsg,"%s",mParent->GetHttp()->GetError());
+ 
+   } else {
+ 
diff --git a/BlockOutII.spec b/BlockOutII.spec
index 5192cce..d98c3c0 100644
--- a/BlockOutII.spec
+++ b/BlockOutII.spec
@@ -5,7 +5,7 @@
 
 Name:           BlockOutII
 Version:        2.4
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        A free adaptation of the original BlockOut DOS game
 Group:          Amusements/Games
 License:        GPLv2+
@@ -23,6 +23,7 @@ Patch2:         BlockOutII-2.3-bl2Home.patch
 Patch3:         BlockOutII-2.3-music.patch
 Patch4:         BlockOutII-2.3-restore-resolution.patch
 Patch5:         BlockOutII-2.3-libpng15.patch
+Patch6:         BlockOutII-2.3-format-security.patch
 BuildRequires:  SDL_mixer-devel libpng-devel desktop-file-utils
 Requires:       hicolor-icon-theme opengl-games-utils
 
@@ -47,6 +48,7 @@ Pons.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 # Convert the README and put it somewhere we can use it from %%doc
 iconv -f ISO8859-1 -t UTF8 %{SOURCE1} > t; mv t BlockOut/README.txt
@@ -107,6 +109,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_datadir}/icons/hicolor/32x32/apps/%{name}.png
 
 %changelog
+* Thu Dec 12 2013 Hans de Goede <hdegoede at redhat.com> - 2.4-7
+- Fix building with -Werror=format-security (rhbz#1037001)
+
 * Fri Aug 02 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.4-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list