[beast/devel: 3/6] BSE: applied format-security patch by Alessio Treglia (#665097)



commit 508d452b98768ec620dd2c45593fb1eebcab9b1e
Author: Tim Janik <timj gnu org>
Date:   Sun Jan 20 03:29:56 2013 +0100

    BSE: applied format-security patch by Alessio Treglia (#665097)

 bse/bseconstant.cc |    6 +++---
 bse/bsecxxvalue.cc |    2 +-
 bse/bseitem.cc     |    2 +-
 bse/bsejanitor.cc  |    6 +++---
 bse/bsemain.cc     |    4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/bse/bseconstant.cc b/bse/bseconstant.cc
index f641f09..c259483 100644
--- a/bse/bseconstant.cc
+++ b/bse/bseconstant.cc
@@ -70,7 +70,7 @@ bse_constant_class_init (BseConstantClass *klass)
     {
       gchar *ident, *label, *blurb, *group = g_strdup_printf (_("Constant Output %u"), i);
       ident = g_strdup_printf ("value_%u", i);
-      label = g_strdup_printf (_("Value [float]"));
+      label = g_strdup_printf ("%s", _("Value [float]"));
       bse_object_class_add_param (object_class, group, PARAM_VALUE + (i - 1) * 3,
 				  sfi_pspec_real (ident, label, _("Constant signal value"),
 						  1.0, -1.0, 1.0, 0.01,
@@ -78,7 +78,7 @@ bse_constant_class_init (BseConstantClass *klass)
       g_free (ident);
       g_free (label);
       ident = g_strdup_printf ("frequency_%u", i);
-      label = g_strdup_printf (_("Frequency"));
+      label = g_strdup_printf ("%s", _("Frequency"));
       bse_object_class_add_param (object_class, group, PARAM_FREQ + (i - 1) * 3,
 				  sfi_pspec_log_scale (ident, label, _("Constant signal value interpreted as frequency value in Hertz"),
 						       BSE_MAX_FREQUENCY,
@@ -89,7 +89,7 @@ bse_constant_class_init (BseConstantClass *klass)
       g_free (ident);
       g_free (label);
       ident = g_strdup_printf ("note_%u", i);
-      label = g_strdup_printf (_("Note"));
+      label = g_strdup_printf ("%s", _("Note"));
       bse_object_class_add_param (object_class, group, PARAM_NOTE + (i - 1) * 3,
 				  sfi_pspec_note (ident, label, _("Constant signal value as note, converted to Hertz according to the current musical tuning"),
 						  SFI_KAMMER_NOTE, SFI_MIN_NOTE, SFI_MAX_NOTE,
diff --git a/bse/bsecxxvalue.cc b/bse/bsecxxvalue.cc
index 950e03d..69d1779 100644
--- a/bse/bsecxxvalue.cc
+++ b/bse/bsecxxvalue.cc
@@ -37,7 +37,7 @@ Value::get_string () const
 {
   GValue *v = gvalue();
   if (SFI_VALUE_HOLDS_STRING (v))
-    return sfi_value_get_string (v);
+    return  sfi_value_get_string (v);
   else if (SFI_VALUE_HOLDS_CHOICE (v))
     return sfi_value_get_choice (v);
   else
diff --git a/bse/bseitem.cc b/bse/bseitem.cc
index 4976aa5..40dd438 100644
--- a/bse/bseitem.cc
+++ b/bse/bseitem.cc
@@ -743,7 +743,7 @@ undo_call_proc (BseUndoStep  *ustep,
     {
       const char *packed_item_pointer = g_value_get_string (ivalues + 0);
       BseItem *item = (BseItem*) bse_undo_pointer_unpack (packed_item_pointer, ustack);
-      BseUndoStack *redo_stack = (BseUndoStack*) bse_item_undo_open (item, BSE_PROCEDURE_NAME (proc));
+      BseUndoStack *redo_stack = (BseUndoStack*) bse_item_undo_open (item, "%s", BSE_PROCEDURE_NAME (proc));
       BseUndoStep *redo_step;
       redo_step = bse_undo_step_new (undo_call_proc, unde_free_proc, 3);
       redo_step->data[0].v_pointer = proc;
diff --git a/bse/bsejanitor.cc b/bse/bsejanitor.cc
index 17c4abe..c0d0c51 100644
--- a/bse/bsejanitor.cc
+++ b/bse/bsejanitor.cc
@@ -445,9 +445,9 @@ janitor_idle_clean_jsource (void *data)
     {
       self->exit_code = 256; /* exit code used for signals */
       if (port->exit_signal_sent && port->sigkill_sent)
-        self->exit_reason = g_strdup_printf (_("killed by janitor"));
+        self->exit_reason = g_strdup_printf ("%s", _("killed by janitor"));
       else if (port->exit_signal_sent && port->sigterm_sent)
-        self->exit_reason = g_strdup_printf (_("connection terminated"));
+        self->exit_reason = g_strdup_printf ("%s", _("connection terminated"));
       else if (port->exit_signal && port->dumped_core)
         self->exit_reason = g_strdup_printf (_("%s (core dumped)"), g_strsignal (port->exit_signal));
       else if (port->exit_signal)
@@ -473,7 +473,7 @@ janitor_idle_clean_jsource (void *data)
     {
       /* not a janitor for a remote process */
       self->exit_code = -256;
-      self->exit_reason = g_strdup_printf ("unknown intern termination");
+      self->exit_reason = g_strdup_printf ("%s", "unknown intern termination");
     }
   sfi_com_port_unref (port);
   self->port = NULL;
diff --git a/bse/bsemain.cc b/bse/bsemain.cc
index 16e1e74..4a84e4d 100644
--- a/bse/bsemain.cc
+++ b/bse/bsemain.cc
@@ -216,9 +216,9 @@ bse_init_core (void)
   /* dump device list */
   if (bse_main_args->dump_driver_list)
     {
-      g_printerr (_("\nAvailable PCM drivers:\n"));
+      g_printerr ("%s", _("\nAvailable PCM drivers:\n"));
       bse_device_dump_list (BSE_TYPE_PCM_DEVICE, "  ", TRUE, NULL, NULL);
-      g_printerr (_("\nAvailable MIDI drivers:\n"));
+      g_printerr ("%s", _("\nAvailable MIDI drivers:\n"));
       bse_device_dump_list (BSE_TYPE_MIDI_DEVICE, "  ", TRUE, NULL, NULL);
     }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]