[gocl] Fix FTBFS with -Werror=format-security (#1037097, #1106699)

Yaakov Selkowitz yselkowitz at fedoraproject.org
Tue Jul 8 00:02:41 UTC 2014


commit f4dc7f4c777fcd9636445edd65274fd57eb38997
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date:   Mon Jun 23 17:35:01 2014 -0500

    Fix FTBFS with -Werror=format-security (#1037097, #1106699)

 gocl-0.2.0-format-security.patch |   20 ++++++++++++++++++++
 gocl.spec                        |    7 ++++++-
 2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/gocl-0.2.0-format-security.patch b/gocl-0.2.0-format-security.patch
new file mode 100644
index 0000000..2c31af8
--- /dev/null
+++ b/gocl-0.2.0-format-security.patch
@@ -0,0 +1,20 @@
+--- a/gocl/gocl-error.c
++++ b/gocl/gocl-error.c
+@@ -108,7 +108,7 @@ gocl_error_check_opencl (cl_int err_code, GError **error)
+       g_set_error (error,
+                    GOCL_OPENCL_ERROR,
+                    err_code,
+-                   get_error_code_description (err_code));
++                   "%s", get_error_code_description (err_code));
+       return TRUE;
+     }
+   else
+@@ -127,7 +127,7 @@ gocl_error_check_opencl_internal (cl_int err_code)
+       g_set_error (&last_error,
+                    GOCL_OPENCL_ERROR,
+                    err_code,
+-                   get_error_code_description (err_code));
++                   "%s", get_error_code_description (err_code));
+       return TRUE;
+     }
+   else
diff --git a/gocl.spec b/gocl.spec
index c05982e..3639a1d 100644
--- a/gocl.spec
+++ b/gocl.spec
@@ -2,12 +2,13 @@
 
 Name:           gocl
 Version:        0.2.0
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        GLib/GObject based library for OpenCL
 
 License:        LGPLv3
 URL:            https://github.com/elima/gocl/
 Source0:        https://github.com/elima/gocl/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Patch0:         gocl-0.2.0-format-security.patch
 
 BuildRequires:  automake
 BuildRequires:  glibc-devel
@@ -40,6 +41,7 @@ developing applications that use %{name}.
 
 %prep
 %setup -q
+%patch0 -p1
 
 
 %build
@@ -75,6 +77,9 @@ find %{buildroot} -type f -name '*.la' | xargs rm -f -- || :
 
 
 %changelog
+* Mon Jun 23 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 0.2.0-3
+- Fix FTBFS with -Werror=format-security (#1037097, #1106699)
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.0-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list