[libgnomecups/epel7] Add format string security patch

Lubomir Rintel lkundrak at fedoraproject.org
Tue Jan 14 14:25:27 UTC 2014


commit 8888e426cc1716c0c990c8e874ee88438af6a1be
Author: Lubomir Rintel <lkundrak at v3.sk>
Date:   Tue Jan 14 15:25:14 2014 +0100

    Add format string security patch

 libgnomecups-format-string.patch |   34 ++++++++++++++++++++++++++++++++++
 libgnomecups.spec                |    9 +++++++--
 2 files changed, 41 insertions(+), 2 deletions(-)
---
diff --git a/libgnomecups-format-string.patch b/libgnomecups-format-string.patch
new file mode 100644
index 0000000..7972314
--- /dev/null
+++ b/libgnomecups-format-string.patch
@@ -0,0 +1,34 @@
+From afe4d5299e6f48ace0fbedbfba8159812afcdd1c Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Tue, 14 Jan 2014 15:23:59 +0100
+Subject: [PATCH] Fix build with -Werror=format-security
+
+---
+ libgnomecups/gnome-cups-request.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libgnomecups/gnome-cups-request.c b/libgnomecups/gnome-cups-request.c
+index c94f623..fa1bd97 100644
+--- a/libgnomecups/gnome-cups-request.c
++++ b/libgnomecups/gnome-cups-request.c
+@@ -353,7 +353,7 @@ request_thread_main (GnomeCupsRequest *request,
+ 			g_warning ("IPP request failed with status %d", status);
+ 			if (request->error != NULL)
+ 				*(request->error) = g_error_new (GNOME_CUPS_ERROR, 
+-								 status, ippErrorString (status));
++								 status, "%s", ippErrorString (status));
+ 		} else if (request->response && _gnome_cups_debug) {
+ 			g_print ("response = \n");
+ 			dump_request (request->response);
+@@ -364,7 +364,7 @@ request_thread_main (GnomeCupsRequest *request,
+ 		request->response = NULL;
+ 		if (HTTP_OK != status && request->error != NULL)
+ 			*(request->error) = g_error_new (GNOME_CUPS_ERROR, 
+-							 status, httpStatus (status));
++							 status, "%s", httpStatus (status));
+ 	} else {
+ 		g_warning ("Neither request nor output_fd set");
+ 		if (request->error != NULL)
+-- 
+1.8.3.1
+
diff --git a/libgnomecups.spec b/libgnomecups.spec
index f5cf1da..fd1a4e8 100644
--- a/libgnomecups.spec
+++ b/libgnomecups.spec
@@ -1,7 +1,7 @@
 Summary:  GNOME library for CUPS integration
 Name:     libgnomecups
 Version:  0.2.3
-Release:  15%{?dist}
+Release:  16%{?dist}
 License:  LGPLv2
 Group:    Development/Libraries
 URL:      http://www.gnome.org
@@ -22,6 +22,7 @@ Patch5: libgnomecups-0.1.14-go-direct.patch
 # http://bugzilla.gnome.org/show_bug.cgi?id=520449
 Patch6: libgnomecups-lpoptions.patch
 Patch7: libgnomecups-glib-header.patch
+Patch8: libgnomecups-format-string.patch
 
 %description
 GNOME library for CUPS integration
@@ -41,10 +42,11 @@ GNOME library for CUPS integration
 %patch5 -p1 -b .go-direct
 %patch6 -p1 -b .lpoptions
 %patch7 -p1 -b .glib-header
+%patch8 -p1 -b .format-string
 
 %build
 autoreconf -f -i
-CFLAGS="%{optflags} -D_CUPS_IPP_PRIVATE_H_"
+CFLAGS="%{optflags} -D_CUPS_IPP_PRIVATE_H_ -Werror=format-security"
 %configure --with-dbus=yes --disable-static
 make  %{?_smp_mflags}
 
@@ -71,6 +73,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
 %{_libdir}/*.so
 
 %changelog
+* Tue Jan 14 2014 Lubomir Rintel <lkundrak at v3.sk> - 0.2.3-16
+- Add format string security patch
+
 * Tue Jan 14 2014 Lubomir Rintel <lkundrak at v3.sk> - 0.2.3-15
 - Fix FTBFS by accessing private cups structures. Sigh.
 


More information about the scm-commits mailing list