[gtk-splitter] * Jun 13 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 2.2.1-11 - Fix FTBFS with -Werror=format-secu

Fabian Affolter fab at fedoraproject.org
Mon Jun 23 21:33:57 UTC 2014


commit cb173cc7fc1778832a51aaca60f56b32266c2d76
Author: Fabian Affolter <mail at fabian-affolter.ch>
Date:   Mon Jun 23 23:33:39 2014 +0200

    * Jun 13 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 2.2.1-11
    - Fix FTBFS with -Werror=format-security (rhbz#1037112, rhbz#1106737)

 gtk-splitter-2.2.1-format-security.patch |   34 ++++++++++++++++++++++++++++++
 gtk-splitter.spec                        |    7 +++++-
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/gtk-splitter-2.2.1-format-security.patch b/gtk-splitter-2.2.1-format-security.patch
new file mode 100644
index 0000000..918e10b
--- /dev/null
+++ b/gtk-splitter-2.2.1-format-security.patch
@@ -0,0 +1,34 @@
+diff --git a/src/dostextfile.c b/src/dostextfile.c
+index 9a4ddb5..c6b807f 100644
+--- a/src/dostextfile.c
++++ b/src/dostextfile.c
+@@ -30,14 +30,14 @@
+ /* Write a string to the file pointed to by b without the eoln. */
+ void write_dostextfile(FILE *b, char *data)
+ {
+-   fprintf( b, data );
++   fprintf( b, "%s", data );
+    fflush( b );
+ }
+ 
+ /* Write a string to the file pointed to by b with the eoln. */
+ void writeln_dostextfile(FILE *b, char *data)
+ {
+-   fprintf( b, data );
++   fprintf( b, "%s", data );
+    fputc( 0x0d, b );
+    fputc( 0x0a, b );
+    fflush( b );
+diff --git a/src/interface.c b/src/interface.c
+index 085f39c..dc6e9e9 100644
+--- a/src/interface.c
++++ b/src/interface.c
+@@ -216,7 +216,7 @@ void display_error( gchar *error )
+                                     GTK_DIALOG_MODAL,
+                                     GTK_MESSAGE_ERROR,
+                                     GTK_BUTTONS_CLOSE,
+-                                    error );
++                                    "%s", error );
+                                     
+    /* Display the error dialog. */  
+    gtk_dialog_run( GTK_DIALOG ( dialog ) );
diff --git a/gtk-splitter.spec b/gtk-splitter.spec
index 8dbd9e4..302aa0a 100644
--- a/gtk-splitter.spec
+++ b/gtk-splitter.spec
@@ -1,11 +1,12 @@
 Name:           gtk-splitter
 Version:        2.2.1
-Release:        10%{?dist}
+Release:        11%{?dist}
 Summary:        A file splitter
 
 License:        GPLv2+
 URL:            http://gtk-splitter.sourceforge.net/
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+Patch0:         gtk-splitter-2.2.1-format-security.patch
 
 BuildRequires:  mhash-devel
 BuildRequires:  gtk2-devel
@@ -21,6 +22,7 @@ etc.
 
 %prep
 %setup -q
+%patch0 -p1 -b .error
 
 %build
 %configure
@@ -41,6 +43,9 @@ desktop-file-install                                    \
 %{_datadir}/pixmaps/%{name}.png
 
 %changelog
+* Fri Jun 13 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 2.2.1-11
+- Fix FTBFS with -Werror=format-security (rhbz#1037112, rhbz#1106737)
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2.1-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list