Blob Blame History Raw
From 46571b1b2f7c9f6c9c3eef7b5b96aed8c792fe7d Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 26 Apr 2016 08:27:24 +0200
Subject: [PATCH] all: format security

https://github.com/pld-linux/libreport/blob/d8f3599a9073699caad425293c0d39afe3d2c4c4/format-security.patch
https://github.com/pld-linux/libreport/blob/ba3309594e53f98e110bcfa2ec2596d0c18e3ec0/format-security.patch

Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
 src/gui-wizard-gtk/wizard.c       | 2 +-
 src/plugins/reporter-rhtsupport.c | 2 +-
 src/plugins/reporter-ureport.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index 50047d5..bdee590 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -3196,7 +3196,7 @@ static void on_btn_add_file(GtkButton *button)
                 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
                 GTK_MESSAGE_WARNING,
                 GTK_BUTTONS_CLOSE,
-                message);
+                "%s", message);
             free(message);
             gtk_window_set_transient_for(GTK_WINDOW(dlg), GTK_WINDOW(g_wnd_assistant));
             gtk_dialog_run(GTK_DIALOG(dlg));
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
index 8778fa7..82b0c8e 100644
--- a/src/plugins/reporter-rhtsupport.c
+++ b/src/plugins/reporter-rhtsupport.c
@@ -269,7 +269,7 @@ char *submit_ureport(const char *dump_dir_name, struct ureport_server_config *co
         ureport_server_response_save_in_dump_dir(resp, dump_dir_name, conf);
 
         if (resp->urr_message)
-            log(resp->urr_message);
+            log("%s", resp->urr_message);
     }
     else if (g_verbose > 2)
         error_msg(_("Server responded with an error: '%s'"), resp->urr_value);
diff --git a/src/plugins/reporter-ureport.c b/src/plugins/reporter-ureport.c
index 52a05f5..adab8ec 100644
--- a/src/plugins/reporter-ureport.c
+++ b/src/plugins/reporter-ureport.c
@@ -312,7 +312,7 @@ int main(int argc, char **argv)
         {
             log(_("This problem has already been reported."));
             if (response->urr_message)
-                log(response->urr_message);
+                log("%s", response->urr_message);
 
             ret = EXIT_STOP_EVENT_RUN;
         }
-- 
2.7.4