commit ceaa4e5c98179f28d728c8fc7fb56f5111838e8b
Author: Jan Rękorajski <[email protected]>
Date:   Mon Nov 12 21:58:10 2012 +0100

    - fix -Wformat-security errors
    - rel 2

 imsettings-format-security.patch | 140 +++++++++++++++++++++++++++++++++++++++
 imsettings.spec                  |   4 +-
 2 files changed, 143 insertions(+), 1 deletion(-)
---
diff --git a/imsettings.spec b/imsettings.spec
index b1e0afe..baf79b5 100644
--- a/imsettings.spec
+++ b/imsettings.spec
@@ -7,7 +7,7 @@ Summary:        Delivery framework for general Input Method 
configuration
 Summary(pl.UTF-8):     Szkielet do ogólnej konfiguracji method wprowadzania 
znaków
 Name:          imsettings
 Version:       1.4.0
-Release:       1
+Release:       2
 License:       LGPL v2+
 Group:         Applications/System
 #Source0Download: http://code.google.com/p/imsettings/downloads/list
@@ -15,6 +15,7 @@ Source0:      
http://imsettings.googlecode.com/files/%{name}-%{version}.tar.bz2
 # Source0-md5: eb2e37056afe2f4be4b843a6b31f5bd1
 Patch0:                %{name}-constraint-of-language.patch
 Patch1:                %{name}-no-bash.patch
+Patch2:                %{name}-format-security.patch
 URL:           http://code.google.com/p/imsettings/
 BuildRequires: GConf2-devel >= 2.0
 BuildRequires: dbus-devel
@@ -264,6 +265,7 @@ Ten pakiet zawiera moduł umożliwiający to dla aplikacji 
LXDE.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %configure \
diff --git a/imsettings-format-security.patch b/imsettings-format-security.patch
new file mode 100644
index 0000000..3d46a07
--- /dev/null
+++ b/imsettings-format-security.patch
@@ -0,0 +1,140 @@
+--- imsettings-1.4.0/imsettings/imsettings-utils.c~    2012-07-12 
10:22:21.000000000 +0200
++++ imsettings-1.4.0/imsettings/imsettings-utils.c     2012-11-12 
21:51:48.147954848 +0100
+@@ -146,7 +146,7 @@
+               GDBusNodeInfo *introspection_data = 
g_dbus_node_info_new_for_xml(introspection_xml, &err);
+ 
+               if (err) {
+-                      g_warning(err->message);
++                      g_warning("%s", err->message);
+                       return NULL;
+               }
+               info = 
g_dbus_interface_info_ref(introspection_data->interfaces[0]);
+--- imsettings-1.4.0/imsettings-daemon/imsettings-module.c~    2011-10-14 
05:23:26.000000000 +0200
++++ imsettings-1.4.0/imsettings-daemon/imsettings-module.c     2012-11-12 
21:52:35.441286514 +0100
+@@ -260,7 +260,7 @@
+                                               &mod_cb);
+ 
+                               if (!mod_cb) {
+-                                      g_warning(g_module_error());
++                                      g_warning("%s", g_module_error());
+                                       goto next;
+                               }
+                               priv->switch_im = mod_cb;
+@@ -268,7 +268,7 @@
+                                               "module_dump_im",
+                                               &mod_cb);
+                               if (!mod_cb) {
+-                                      g_warning(g_module_error());
++                                      g_warning("%s", g_module_error());
+                                       goto next;
+                               }
+                               priv->dump_im = mod_cb;
+--- imsettings-1.4.0/imsettings-daemon/imsettings-proc.c~      2012-04-26 
04:15:38.000000000 +0200
++++ imsettings-1.4.0/imsettings-daemon/imsettings-proc.c       2012-11-12 
21:53:11.314618581 +0100
+@@ -109,7 +109,7 @@
+       }
+       str = g_string_new(NULL);
+       g_string_append_printf(str, "%s[%lu]: %s", module, 
(gulong)priv->main.pid, buffer);
+-      g_message(str->str);
++      g_message("%s", str->str);
+       g_string_free(str, TRUE);
+       g_free(buffer);
+ 
+@@ -204,7 +204,7 @@
+                                                        type_names[type],
+                                                        module);
+ 
+-                      g_critical(message);
++                      g_critical("%s", message);
+                       g_signal_emit(proc, signals[SIG_NOTIFY_NOTIFICATION], 
0, NOTIFY_URGENCY_CRITICAL, title, message, 0);
+                       g_free(message);
+                       unref = TRUE;
+@@ -303,7 +303,7 @@
+               g_set_error(error, IMSETTINGS_GERROR, IMSETTINGS_GERROR_UNKNOWN,
+                           _("[BUG] %s process is still running [pid: %d]\n"),
+                           type_name, pinfo->pid);
+-              g_warning((*error)->message);
++              g_warning("%s", (*error)->message);
+               return FALSE;
+       } else {
+               /* close io channels prior to create new one */
+--- imsettings-1.4.0/imsettings-daemon/imsettings-server.c~    2012-08-28 
12:50:19.000000000 +0200
++++ imsettings-1.4.0/imsettings-daemon/imsettings-server.c     2012-11-12 
21:53:57.621283613 +0100
+@@ -707,7 +707,7 @@
+               g_clear_error(error);
+               g_set_error(error, IMSETTINGS_GERROR, 
IMSETTINGS_GERROR_IM_NOT_FOUND,
+                           _("No such input method on your system: %s"), 
module);
+-              g_warning((*error)->message);
++              g_warning("%s", (*error)->message);
+ 
+               return FALSE;
+       }
+@@ -716,7 +716,7 @@
+       if (!*info) {
+               g_set_error(error, IMSETTINGS_GERROR, IMSETTINGS_GERROR_OOM,
+                           _("Out of memory"));
+-              g_warning((*error)->message);
++              g_warning("%s", (*error)->message);
+ 
+               return FALSE;
+       }
+@@ -750,7 +750,7 @@
+                       } else if (match) {
+                               g_set_error(error, IMSETTINGS_GERROR, 
IMSETTINGS_GERROR_NOT_TARGETED_DESKTOP,
+                                                   _("Current desktop isn't 
targeted by Input Method."));
+-                              g_warning((*error)->message);
++                              g_warning("%s", (*error)->message);
+                               g_strfreev(list);
+ 
+                               return FALSE;
+--- imsettings-1.4.0/backends/lxde/lxde-module.c~      2012-04-23 
10:28:00.000000000 +0200
++++ imsettings-1.4.0/backends/lxde/lxde-module.c       2012-11-12 
21:54:41.767948722 +0100
+@@ -176,7 +176,7 @@
+ 
+       retval = g_key_file_get_string(key, "GTK", "sGtk/IMModule", &err);
+       if (err) {
+-              g_warning(err->message);
++              g_warning("%s", err->message);
+               g_error_free(err);
+       }
+   finalize:
+--- imsettings-1.4.0/backends/xim/loopback.c~  2011-03-08 07:39:32.000000000 
+0100
++++ imsettings-1.4.0/backends/xim/loopback.c   2012-11-12 21:56:22.811278492 
+0100
+@@ -774,7 +774,7 @@
+               gboolean retval;
+ 
+               g_xim_message_warning(G_XIM_PROTOCOL_GET_IFACE (proto)->message,
+-                                    msg);
++                                    "%s", msg);
+               retval = g_xim_connection_cmd_error(G_XIM_CONNECTION (proto),
+                                                   imid, icid, 
G_XIM_EMASK_VALID_IMID | G_XIM_EMASK_VALID_ICID,
+                                                   G_XIM_ERR_BadProtocol,
+@@ -804,7 +804,7 @@
+               gboolean retval;
+ 
+               g_xim_message_warning(G_XIM_PROTOCOL_GET_IFACE (proto)->message,
+-                                    msg);
++                                    "%s", msg);
+               retval = g_xim_connection_cmd_error(G_XIM_CONNECTION (proto),
+                                                   imid, icid, 
G_XIM_EMASK_VALID_IMID | G_XIM_EMASK_VALID_ICID,
+                                                   G_XIM_ERR_BadProtocol,
+@@ -845,7 +845,7 @@
+               gboolean retval;
+ 
+               g_xim_message_warning(G_XIM_PROTOCOL_GET_IFACE (proto)->message,
+-                                    msg);
++                                    "%s", msg);
+               retval = g_xim_connection_cmd_error(G_XIM_CONNECTION (proto),
+                                                   imid, icid, 
G_XIM_EMASK_VALID_IMID | G_XIM_EMASK_VALID_ICID,
+                                                   G_XIM_ERR_BadProtocol,
+--- imsettings-1.4.0/backends/xim/proxy.c~     2011-03-08 07:39:32.000000000 
+0100
++++ imsettings-1.4.0/backends/xim/proxy.c      2012-11-12 21:56:58.437943903 
+0100
+@@ -796,7 +796,7 @@
+               retval = g_xim_connection_cmd_error(G_XIM_CONNECTION (conn), 
imid, icid, flag,
+                                                   G_XIM_ERR_BadProtocol, 0, 
msg);
+       }
+-      g_xim_message_error(G_XIM_PROTOCOL_GET_IFACE (proto)->message, msg);
++      g_xim_message_error(G_XIM_PROTOCOL_GET_IFACE (proto)->message, "%s", 
msg);
+       g_free(msg);
+ 
+       return retval;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/imsettings.git/commitdiff/ceaa4e5c98179f28d728c8fc7fb56f5111838e8b

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to