[Pkg-privacy-commits] [nautilus-wipe] 192/224: Mark functions expecting printf-style arguments with the GNUC attribute

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Jul 7 19:45:49 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch master
in repository nautilus-wipe.

commit 6afb01b1c3c41a4f0aadc70dda8ab7d9a1199447
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Tue May 28 16:15:44 2013 +0200

    Mark functions expecting printf-style arguments with the GNUC attribute
    
    This allows some compilers (GCC, CLang) to track improper format passed
    to these functions, potentially preventing security issues.
    
    Also fix a potentially problematic yet actually harmless format string
    detected by the compiler.
---
 nautilus-wipe/nw-operation-manager.c | 2 +-
 nautilus-wipe/nw-progress-dialog.h   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/nautilus-wipe/nw-operation-manager.c b/nautilus-wipe/nw-operation-manager.c
index 3da5deb..c4171e4 100644
--- a/nautilus-wipe/nw-operation-manager.c
+++ b/nautilus-wipe/nw-operation-manager.c
@@ -535,7 +535,7 @@ nw_operation_manager_run (GtkWindow    *parent,
     opdata->window_destroy_hid = g_signal_connect (opdata->window, "destroy",
                                                    G_CALLBACK (opdata_window_destroy_handler), opdata);
     opdata->progress_dialog = NW_PROGRESS_DIALOG (nw_progress_dialog_new (opdata->window, 0,
-                                                                          progress_dialog_text));
+                                                                          "%s", progress_dialog_text));
     nw_progress_dialog_set_has_cancel_button (opdata->progress_dialog, TRUE);
     g_signal_connect (opdata->progress_dialog, "response",
                       G_CALLBACK (progress_dialog_response_handler), opdata);
diff --git a/nautilus-wipe/nw-progress-dialog.h b/nautilus-wipe/nw-progress-dialog.h
index f65b287..05dbef4 100644
--- a/nautilus-wipe/nw-progress-dialog.h
+++ b/nautilus-wipe/nw-progress-dialog.h
@@ -58,7 +58,7 @@ GType         nw_progress_dialog_get_type                   (void) G_GNUC_CONST;
 GtkWidget    *nw_progress_dialog_new                        (GtkWindow       *parent,
                                                              GtkDialogFlags   flags,
                                                              const gchar     *format,
-                                                             ...);
+                                                             ...) G_GNUC_PRINTF (3, 4);
 void          nw_progress_dialog_set_fraction               (NwProgressDialog  *dialog,
                                                              gdouble            fraction);
 gdouble       nw_progress_dialog_get_fraction               (NwProgressDialog  *dialog);
@@ -68,11 +68,11 @@ void          nw_progress_dialog_set_pulse_step             (NwProgressDialog  *
 gdouble       nw_progress_dialog_get_pulse_step             (NwProgressDialog  *dialog);
 void          nw_progress_dialog_set_progress_text          (NwProgressDialog  *dialog,
                                                              const gchar       *format,
-                                                             ...);
+                                                             ...) G_GNUC_PRINTF (2, 3);
 const gchar  *nw_progress_dialog_get_progress_text          (NwProgressDialog  *dialog);
 void          nw_progress_dialog_set_text                   (NwProgressDialog  *dialog,
                                                              const gchar       *format,
-                                                             ...);
+                                                             ...) G_GNUC_PRINTF (2, 3);
 const gchar  *nw_progress_dialog_get_text                   (NwProgressDialog  *dialog);
 void          nw_progress_dialog_cancel                     (NwProgressDialog  *dialog);
 gboolean      nw_progress_dialog_is_canceled                (NwProgressDialog  *dialog);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/nautilus-wipe.git



More information about the Pkg-privacy-commits mailing list