[atari++] - fix build with -Werror=format-security (#1036993)

Dan Horák sharkcz at fedoraproject.org
Tue Dec 3 13:18:12 UTC 2013


commit 191720519e070dcfff64cfc965412acd27740d0b
Author: Dan Horák <dan at danny.cz>
Date:   Tue Dec 3 14:18:05 2013 +0100

    - fix build with -Werror=format-security (#1036993)

 atari++-1.72-format.patch |   24 ++++++++++++++++++++++++
 atari++.spec              |   11 ++++++++++-
 2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/atari++-1.72-format.patch b/atari++-1.72-format.patch
new file mode 100644
index 0000000..4d1219a
--- /dev/null
+++ b/atari++-1.72-format.patch
@@ -0,0 +1,24 @@
+diff -up atari++/interfacebox.cpp.format atari++/interfacebox.cpp
+--- atari++/interfacebox.cpp.format	2013-03-15 22:26:24.000000000 +0100
++++ atari++/interfacebox.cpp	2013-12-03 13:24:50.000000000 +0100
+@@ -268,7 +268,7 @@ void InterfaceBox::SignalDeviceError(con
+     SerialStream = NULL;
+     DevError = true;
+   }
+-  machine->PutWarning(msg);
++  machine->PutWarning("%s", msg);
+ }
+ ///
+ 
+diff -up atari++/screendump.cpp.format atari++/screendump.cpp
+--- atari++/screendump.cpp.format	2013-12-03 13:31:13.000000000 +0100
++++ atari++/screendump.cpp	2013-12-03 13:31:29.000000000 +0100
+@@ -465,7 +465,7 @@ void ScreenDump::PNGWarningHandler(png_s
+   class ScreenDump *that = (class ScreenDump *)png_get_error_ptr(png_ptr);
+   //
+   // Use the machine PutWarning for that.
+-  that->machine->PutWarning((const char *)error_msg);
++  that->machine->PutWarning("%s", (const char *)error_msg);
+ }
+ #endif
+ ///
diff --git a/atari++.spec b/atari++.spec
index 9b9f484..7e37399 100644
--- a/atari++.spec
+++ b/atari++.spec
@@ -1,6 +1,6 @@
 Name:           atari++
 Version:        1.72
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Unix based emulator of the Atari eight bit computers
 
 Group:          Applications/Emulators
@@ -9,6 +9,8 @@ URL:            http://www.xl-project.com/
 Source0:        http://www.xl-project.com/download/%{name}_%{version}.tar.gz
 # be verbose during compile
 Patch1:         %{name}-verbose.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=1036993
+Patch2:         %{name}-1.72-format.patch
 
 BuildRequires:  SDL-devel libICE-devel libSM-devel zlib-devel ncurses-devel libpng-devel
 
@@ -25,6 +27,7 @@ the AtariXL operating system closely.
 %prep
 %setup -q -n %{name}
 %patch1 -p1 -b .verbose
+%patch2 -p1 -b .format
 
 # fix encoding
 f=README.History
@@ -32,6 +35,9 @@ iconv -f ISO8859-1 -t UTF-8 -o $f.new $f
 touch -r $f $f.new
 mv $f.new $f
 
+# fix permissions for sources
+chmod a-x *.cpp *.hpp
+
 
 %build
 %configure
@@ -52,6 +58,9 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
 
 
 %changelog
+* Tue Dec 03 2013 Dan Horák <dan[at]danny.cz> 1.72-3
+- fix build with -Werror=format-security (#1036993)
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.72-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list