[ggobi] Fix FTBFS with -Werror=format-security (#1037083, #1106529)
Yaakov Selkowitz
yselkowitz at fedoraproject.org
Mon Jul 7 23:53:09 UTC 2014
commit 217b187aea0871ad49093158450fff62552c5627
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date: Thu Jun 19 20:33:43 2014 -0500
Fix FTBFS with -Werror=format-security (#1037083, #1106529)
ggobi-2.1.7-format-security.patch | 75 +++++++++++++++++++++++++++++++++++++
ggobi.spec | 14 +++---
2 files changed, 82 insertions(+), 7 deletions(-)
---
diff --git a/ggobi-2.1.7-format-security.patch b/ggobi-2.1.7-format-security.patch
new file mode 100644
index 0000000..a80dd3b
--- /dev/null
+++ b/ggobi-2.1.7-format-security.patch
@@ -0,0 +1,75 @@
+diff --git a/src/ggobi.c b/src/ggobi.c
+index 7fd6f3b..6395498 100644
+--- a/src/ggobi.c
++++ b/src/ggobi.c
+@@ -697,10 +697,10 @@ ValidateGGobiRef (ggobid * gg, gboolean fatal)
+ }
+
+ if (fatal) {
+- g_error (error_msg);
++ g_error ("%s", error_msg);
+ }
+ else
+- g_critical (error_msg);
++ g_critical ("%s", error_msg);
+
+ return (NULL);
+ }
+@@ -717,9 +717,9 @@ ValidateDatadRef (GGobiData * d, ggobid * gg, gboolean fatal)
+ }
+
+ if (fatal)
+- g_error (error_msg);
++ g_error ("%s", error_msg);
+ else
+- g_critical (error_msg);
++ g_critical ("%s", error_msg);
+
+ return (NULL);
+ }
+@@ -738,9 +738,9 @@ ValidateDisplayRef (displayd * d, ggobid * gg, gboolean fatal)
+ }
+
+ if (fatal)
+- g_error (error_msg);
++ g_error ("%s", error_msg);
+ else
+- g_critical (error_msg);
++ g_critical ("%s", error_msg);
+
+ return (NULL);
+ }
+diff --git a/src/utils_ui.c b/src/utils_ui.c
+index 311a2fb..7273b5e 100644
+--- a/src/utils_ui.c
++++ b/src/utils_ui.c
+@@ -189,7 +189,7 @@ quick_message (const gchar * const message, gboolean modal)
+
+ dialog =
+ gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_OK,
+- message);
++ "%s", message);
+
+ if (modal)
+ gtk_window_set_modal (GTK_WINDOW (dialog), true);
+diff --git a/src/write_xml.c b/src/write_xml.c
+index b2a7cc4..937609f 100644
+--- a/src/write_xml.c
++++ b/src/write_xml.c
+@@ -37,14 +37,14 @@ static void
+ write_xml_string(FILE *f, gchar *str)
+ {
+ gchar *fmtstr = g_markup_printf_escaped("%s", str);
+- fprintf(f, fmtstr);
++ fprintf(f, "%s", fmtstr);
+ g_free(fmtstr);
+ }
+ static void
+ write_xml_string_fmt(FILE *f, gchar *fmt, gchar *str)
+ {
+ gchar *fmtstr = g_markup_printf_escaped(fmt, str);
+- fprintf(f, fmtstr);
++ fprintf(f, "%s", fmtstr);
+ g_free(fmtstr);
+ }
+
diff --git a/ggobi.spec b/ggobi.spec
index 55d5dbd..5e96689 100644
--- a/ggobi.spec
+++ b/ggobi.spec
@@ -1,13 +1,13 @@
Name: ggobi
Version: 2.1.7
-Release: 11%{?dist}
+Release: 12%{?dist}
Summary: Open source visualization for exploring high-dimensional data
Group: Applications/Engineering
License: GPLv2
URL: http://www.ggobi.org/
Source0: http://www.ggobi.org/downloads/ggobi-%{version}.tar.bz2
Source1: ggobi.desktop
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: ggobi-2.1.7-format-security.patch
BuildRequires: libxml2-devel gtk2-devel, desktop-file-utils
Requires: gtk2, libxml2 >= 2.6
@@ -28,13 +28,13 @@ GGobi devel files
%prep
%setup -q
+%patch0 -p1
%build
%configure --with-all-plugins --datadir=%{_libdir} --disable-rpath
make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
make ggobirc
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
@@ -46,14 +46,10 @@ desktop-file-install \
%{SOURCE1}
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
-%defattr(-,root,root,-)
%doc ABOUT-NLS AUTHORS ChangeLog COPYING CPLicense.txt INSTALL README
%{_bindir}/ggobi
%{_libdir}/*.so.*
@@ -68,6 +64,10 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pkgconfig/ggobi.pc
%changelog
+* Thu Jun 19 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 2.1.7-12
+- Fix FTBFS with -Werror=format-security (#1037083, #1106529)
+- Cleanup spec
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.1.7-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list