Package: libgksu / 2.0.13~pre1-8

02_format-security.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Description: Fix build failure with [-Werror=format-security]
Author: Michael Biebl <biebl@debian.org>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=643423
Index: libgksu-2.0.13~pre1/libgksu/libgksu.c
===================================================================
--- libgksu-2.0.13~pre1.orig/libgksu/libgksu.c	2011-12-07 11:01:18.351654566 +0100
+++ libgksu-2.0.13~pre1/libgksu/libgksu.c	2011-12-07 11:01:41.231654725 +0100
@@ -1276,7 +1276,7 @@
   context->dir = g_strdup (mkdtemp(template));
   if (!context->dir)
     {
-      fprintf (stderr, strerror(errno));
+      fprintf (stderr, "%s", strerror(errno));
       return FALSE;
     }
 
@@ -2247,7 +2247,7 @@
 					  " %s"), converted_str, "gksu: waiting");
 	      g_free (converted_str);
 
-	      g_set_error (error, gksu_quark, GKSU_ERROR_HELPER, emsg);
+	      g_set_error_literal (error, gksu_quark, GKSU_ERROR_HELPER, emsg);
 	      g_free (emsg);
 
 	      if (context->debug)
@@ -2979,8 +2979,11 @@
 	}
     }
 
-  fprintf(stderr, child_stderr);
-  g_free(child_stderr);
+  if (child_stderr != NULL)
+    {
+      fprintf(stderr, "%s", child_stderr);
+      g_free(child_stderr);
+    }
 
   /* if error is set we have found an error condition */
   return (error == NULL);