From 0d4a38635fc26ed09d56b46e462b373489c8a4e2 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sat, 21 Sep 2013 11:42:33 +0100 Subject: Fix format security errors Fixed bugs: - https://launchpad.net/bugs/1193025 (bzr r12563) --- src/box3d-context.cpp | 2 +- src/dropper-context.cpp | 2 +- src/extension/init.cpp | 2 +- src/extension/internal/filter/filter-file.cpp | 2 +- src/extension/system.cpp | 2 +- src/gradient-drag.cpp | 2 +- src/libnrtype/FontFactory.cpp | 2 +- src/selection-describer.cpp | 2 +- src/sp-guide.cpp | 2 +- src/spray-context.cpp | 2 +- src/trace/trace.cpp | 4 ++-- src/tweak-context.cpp | 2 +- src/ui/dialog/print.cpp | 6 +++--- src/ui/dialog/spellcheck.cpp | 2 +- 14 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp index 912c67801..f270fa244 100644 --- a/src/box3d-context.cpp +++ b/src/box3d-context.cpp @@ -585,7 +585,7 @@ void Box3DContext::drag(guint state) { box3d_position_set(this->box3d); // status text - this->message_context->setF(Inkscape::NORMAL_MESSAGE, _("3D Box; with Shift to extrude along the Z axis")); + this->message_context->setF(Inkscape::NORMAL_MESSAGE, "%s", _("3D Box; with Shift to extrude along the Z axis")); } void Box3DContext::finishItem() { diff --git a/src/dropper-context.cpp b/src/dropper-context.cpp index 7dfe203ba..d513dd587 100644 --- a/src/dropper-context.cpp +++ b/src/dropper-context.cpp @@ -279,7 +279,7 @@ bool SPDropperContext::root_handler(GdkEvent* event) { // locale-sensitive printf is OK, since this goes to the UI, not into SVG gchar *alpha = g_strdup_printf(_(" alpha %.3g"), alpha_to_set); // where the color is picked, to show in the statusbar - gchar *where = this->dragging ? g_strdup_printf(_(", averaged with radius %d"), (int) rw) : g_strdup_printf(_(" under cursor")); + gchar *where = this->dragging ? g_strdup_printf(_(", averaged with radius %d"), (int) rw) : g_strdup_printf("%s", _(" under cursor")); // message, to show in the statusbar const gchar *message = this->dragging ? _("Release mouse to set color.") : _("Click to set fill, Shift+click to set stroke; drag to average color in area; with Alt to pick inverse color; Ctrl+C to copy the color under mouse to clipboard"); diff --git a/src/extension/init.cpp b/src/extension/init.cpp index 1a163d4c2..2dde9eeb8 100644 --- a/src/extension/init.cpp +++ b/src/extension/init.cpp @@ -295,7 +295,7 @@ static void build_module_from_dir(gchar const *dirname) { if (!dirname) { - g_warning(_("Null external module directory name. Modules will not be loaded.")); + g_warning("%s", _("Null external module directory name. Modules will not be loaded.")); return; } diff --git a/src/extension/internal/filter/filter-file.cpp b/src/extension/internal/filter/filter-file.cpp index d569c6438..48e64f089 100644 --- a/src/extension/internal/filter/filter-file.cpp +++ b/src/extension/internal/filter/filter-file.cpp @@ -44,7 +44,7 @@ void Filter::filters_load_dir (gchar const * dirname, gchar * menuname) { if (!dirname) { - g_warning(_("Null external module directory name. Filters will not be loaded.")); + g_warning("%s", _("Null external module directory name. Filters will not be loaded.")); return; } diff --git a/src/extension/system.cpp b/src/extension/system.cpp index f7fd48b3f..a4c370f4c 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -124,7 +124,7 @@ SPDocument *open(Extension *key, gchar const *filename) if ( inkscape_use_gui() ) { sp_ui_error_dialog(_("Format autodetect failed. The file is being opened as SVG.")); } else { - g_warning(_("Format autodetect failed. The file is being opened as SVG.")); + g_warning("%s", _("Format autodetect failed. The file is being opened as SVG.")); } } diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp index fb58aa508..096b2b47b 100644 --- a/src/gradient-drag.cpp +++ b/src/gradient-drag.cpp @@ -1438,7 +1438,7 @@ void GrDragger::updateTip() } g_free(item_desc); } else if (g_slist_length (draggables) == 2 && isA (POINT_RG_CENTER) && isA (POINT_RG_FOCUS)) { - this->knot->tip = g_strdup_printf (_("Radial gradient center and focus; drag with Shift to separate focus")); + this->knot->tip = g_strdup_printf ("%s", _("Radial gradient center and focus; drag with Shift to separate focus")); } else { int length = g_slist_length (this->draggables); this->knot->tip = g_strdup_printf (ngettext("Gradient point shared by %d gradient; drag with Shift to separate", diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp index 74c706a1b..c91e57065 100644 --- a/src/libnrtype/FontFactory.cpp +++ b/src/libnrtype/FontFactory.cpp @@ -962,7 +962,7 @@ font_instance *font_factory::Face(PangoFontDescription *descr, bool canFail) nFace = pango_font_map_load_font(fontServer,fontContext,descr); } else { - g_warning(_("Ignoring font without family that will crash Pango")); + g_warning("%s", _("Ignoring font without family that will crash Pango")); } if ( nFace ) { diff --git a/src/selection-describer.cpp b/src/selection-describer.cpp index fc6cb7f91..96ef3d0d1 100644 --- a/src/selection-describer.cpp +++ b/src/selection-describer.cpp @@ -146,7 +146,7 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select if (layer == parent) in_phrase = g_strdup_printf(_(" in %s"), layer_name); else if (!layer) - in_phrase = g_strdup_printf(_(" hidden in definitions")); + in_phrase = g_strdup_printf("%s", _(" hidden in definitions")); else in_phrase = g_strdup_printf(_(" in group %s (%s)"), parent_name, layer_name); } else { diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp index 42a3b1ba7..83d2d8e78 100644 --- a/src/sp-guide.cpp +++ b/src/sp-guide.cpp @@ -470,7 +470,7 @@ char *sp_guide_description(SPGuide const *guide, const bool verbose) char *descr = 0; if ( !guide->document ) { // Guide has probably been deleted and no longer has an attached namedview. - descr = g_strdup_printf(_("Deleted")); + descr = g_strdup_printf("%s", _("Deleted")); } else { SPNamedView *namedview = sp_document_namedview(guide->document, NULL); diff --git a/src/spray-context.cpp b/src/spray-context.cpp index 51fdab6ff..08dc59bce 100644 --- a/src/spray-context.cpp +++ b/src/spray-context.cpp @@ -186,7 +186,7 @@ void SPSprayContext::update_cursor(bool /*with_shift*/) { num = g_slist_length(const_cast(desktop->selection->itemList())); sel_message = g_strdup_printf(ngettext("%i object selected","%i objects selected",num), num); } else { - sel_message = g_strdup_printf(_("Nothing selected")); + sel_message = g_strdup_printf("%s", _("Nothing selected")); } switch (this->mode) { diff --git a/src/trace/trace.cpp b/src/trace/trace.cpp index e2cda6247..cb83541e3 100644 --- a/src/trace/trace.cpp +++ b/src/trace/trace.cpp @@ -213,7 +213,7 @@ Glib::RefPtr Tracer::sioxProcessImage(SPImage *img, Glib::RefPtr(NULL); } @@ -310,7 +310,7 @@ Glib::RefPtr Tracer::sioxProcessImage(SPImage *img, Glib::RefPtr(NULL); } diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp index 2171ecbe4..65106e651 100644 --- a/src/tweak-context.cpp +++ b/src/tweak-context.cpp @@ -168,7 +168,7 @@ void SPTweakContext::update_cursor (bool with_shift) { num = g_slist_length(const_cast(desktop->selection->itemList())); sel_message = g_strdup_printf(ngettext("%i object selected","%i objects selected",num), num); } else { - sel_message = g_strdup_printf(_("Nothing selected")); + sel_message = g_strdup_printf("%s", _("Nothing selected")); } switch (this->mode) { diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp index e6dae278b..03ac9dc64 100644 --- a/src/ui/dialog/print.cpp +++ b/src/ui/dialog/print.cpp @@ -101,7 +101,7 @@ static void draw_page( unlink (tmp_png.c_str()); } else { - g_warning(_("Could not open temporary PNG for bitmap printing")); + g_warning("%s", _("Could not open temporary PNG for bitmap printing")); } } else { @@ -144,11 +144,11 @@ static void draw_page( ret = ctx->finish(); } else { - g_warning(_("Could not set up Document")); + g_warning("%s", _("Could not set up Document")); } } else { - g_warning(_("Failed to set CairoRenderContext")); + g_warning("%s", _("Failed to set CairoRenderContext")); } // Clean up diff --git a/src/ui/dialog/spellcheck.cpp b/src/ui/dialog/spellcheck.cpp index 9cc18c02c..45106755c 100644 --- a/src/ui/dialog/spellcheck.cpp +++ b/src/ui/dialog/spellcheck.cpp @@ -459,7 +459,7 @@ SpellCheck::finished () if (_stops) label = g_strdup_printf(_("Finished, %d words added to dictionary"), _adds); else - label = g_strdup_printf(_("Finished, nothing suspicious found")); + label = g_strdup_printf("%s", _("Finished, nothing suspicious found")); banner_label.set_markup(label); g_free(label); } -- cgit v1.2.3