@@ -0,0 +1,371 @@
+Index: inkscape-0.43/src/interface.cpp
+===================================================================
+--- inkscape-0.43.orig/src/interface.cpp
++++ inkscape-0.43/src/interface.cpp
+@@ -1149,7 +1149,7 @@ sp_ui_error_dialog(gchar const *message)
+ gchar *safeMsg = Inkscape::IO::sanitizeString(message);
+
+ dlg = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR,
+- GTK_BUTTONS_CLOSE, safeMsg);
++ GTK_BUTTONS_CLOSE, "%s", safeMsg);
+ sp_transientize(dlg);
+ gtk_window_set_resizable(GTK_WINDOW(dlg), FALSE);
+ gtk_dialog_run(GTK_DIALOG(dlg));
+Index: inkscape-0.43/src/file.cpp
+===================================================================
+--- inkscape-0.43.orig/src/file.cpp
++++ inkscape-0.43/src/file.cpp
+@@ -239,7 +239,7 @@ sp_file_revert_dialog()
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_YES_NO,
+- text);
++ "%s", text);
+ gint response = gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
+ g_free(text);
+@@ -278,7 +278,7 @@ void dump_str(gchar const *str, gchar co
+ }
+
+ tmp += "]";
+- g_message(tmp.c_str());
++ g_message("%s", tmp.c_str());
+ }
+
+ void dump_ustr(Glib::ustring const &ustr)
+@@ -339,7 +339,7 @@ void dump_ustr(Glib::ustring const &ustr
+ tmp += " ";
+ }
+
+- g_message( tmp.c_str() );
++ g_message("%s", tmp.c_str());
+ }
+ } catch (...) {
+ g_message("XXXXXXXXXXXXXXXXXX Exception" );
+Index: inkscape-0.43/src/message-context.h
+===================================================================
+--- inkscape-0.43.orig/src/message-context.h
++++ inkscape-0.43/src/message-context.h
+@@ -16,6 +16,7 @@
+
+ #include <stdarg.h>
+ #include <glib/gtypes.h>
++#include <glib.h>
+ #include "message.h"
+
+ namespace Inkscape {
+@@ -56,7 +57,7 @@ public:
+ * @param type the message type
+ * @param format a printf-style formatting string
+ */
+- void setF(MessageType type, gchar const *format, ...);
++ void setF(MessageType type, gchar const *format, ...) G_GNUC_PRINTF(3, 4);
+
+ /** @brief pushes a message on the stack using printf-style formatting,
+ * and a stdarg argument list
+@@ -82,7 +83,7 @@ public:
+ * @param type the message type
+ * @param format a printf-style formatting string
+ */
+- void flashF(MessageType type, gchar const *format, ...);
++ void flashF(MessageType type, gchar const *format, ...) G_GNUC_PRINTF(3, 4);
+
+ /** @brief pushes a message onto the stack for a brief period of time
+ * using printf-style formatting and a stdarg argument list;
+Index: inkscape-0.43/src/message-stack.h
+===================================================================
+--- inkscape-0.43.orig/src/message-stack.h
++++ inkscape-0.43/src/message-stack.h
+@@ -16,6 +16,7 @@
+
+ #include <sigc++/sigc++.h>
+ #include <glib/gtypes.h>
++#include <glib.h>
+ #include <stdarg.h>
+ #include "gc-managed.h"
+ #include "gc-finalized.h"
+@@ -85,7 +86,7 @@ public:
+ *
+ * @return the id of the pushed message
+ */
+- MessageId pushF(MessageType type, gchar const *format, ...);
++ MessageId pushF(MessageType type, gchar const *format, ...) G_GNUC_PRINTF(3, 4);
+
+ /** @brief pushes a message onto the stack using printf-like formatting,
+ * using a stdarg argument list
+@@ -124,7 +125,7 @@ public:
+ *
+ * @return the id of the pushed message
+ */
+- MessageId flashF(MessageType type, gchar const *format, ...);
++ MessageId flashF(MessageType type, gchar const *format, ...) G_GNUC_PRINTF(3, 4);
+
+ /** @brief temporarily pushes a message onto the stack using
+ * printf-like formatting, using a stdarg argument list
+Index: inkscape-0.43/src/io/inkscapestream.h
+===================================================================
+--- inkscape-0.43.orig/src/io/inkscapestream.h
++++ inkscape-0.43/src/io/inkscapestream.h
+@@ -13,6 +13,7 @@
+
+
+ #include <glibmm.h>
++#include <glib.h>
+
+ namespace Inkscape
+ {
+@@ -475,7 +476,7 @@ public:
+ virtual void put(gunichar ch) = 0;
+
+ /* Formatted output */
+- virtual Writer& printf(char *fmt, ...) = 0;
++ virtual Writer& printf(char *fmt, ...) G_GNUC_PRINTF(2, 3) = 0;
+
+ virtual Writer& writeChar(char val) = 0;
+
+@@ -531,7 +532,7 @@ public:
+
+
+ /* Formatted output */
+- virtual Writer &printf(char *fmt, ...);
++ virtual Writer &printf(char *fmt, ...) G_GNUC_PRINTF(2, 3);
+
+ virtual Writer& writeChar(char val);
+
+Index: inkscape-0.43/configure.ac
+===================================================================
+--- inkscape-0.43.orig/configure.ac
++++ inkscape-0.43/configure.ac
+@@ -27,7 +27,7 @@ if test "$GCC" = "yes"; then
+ CFLAGS="-Wno-pointer-sign $CFLAGS"
+ AC_COMPILE_IFELSE([int dummy;
+ ], , CFLAGS="$ink_svd_CFLAGS",)
+- CFLAGS="-Wall -W $CFLAGS"
++ CFLAGS="-Wall -Wformat-security -W $CFLAGS"
+ fi
+
+ AC_LANG(C++)
+@@ -612,7 +612,7 @@ if test "$GXX" = "yes"; then
+ # programmer deliberately has an unused parameter (e.g. because it's used
+ # as a callback or similar function pointer use).
+
+- CXXFLAGS="-Wall -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch $CXXFLAGS"
++ CXXFLAGS="-Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch $CXXFLAGS"
+
+ dnl Test for arch-specific situations.
+ case "$host_cpu" in
+Index: inkscape-0.43/src/debug/logger.cpp
+===================================================================
+--- inkscape-0.43.orig/src/debug/logger.cpp
++++ inkscape-0.43/src/debug/logger.cpp
+@@ -109,7 +109,8 @@ static void set_category_mask(bool * con
+ } else if (equal_range("EXTENSION", start, end)) {
+ mask[Event::EXTENSION] = true;
+ } else {
+- g_warning("Unknown debugging category %*s", end - start, start);
++ g_warning("Unknown debugging category %*s",
++ (int) (end - start), start);
+ }
+ }
+ if (*end) {
+Index: inkscape-0.43/src/extension/internal/svg.cpp
+===================================================================
+--- inkscape-0.43.orig/src/extension/internal/svg.cpp
++++ inkscape-0.43/src/extension/internal/svg.cpp
+@@ -126,7 +126,7 @@ _load_uri (const gchar *uri)
+ GnomeVFSResult result = gnome_vfs_open (&handle, uri_local, GNOME_VFS_OPEN_READ);
+
+ if (result != GNOME_VFS_OK) {
+- g_warning(gnome_vfs_result_to_string(result));
++ g_warning("%s", gnome_vfs_result_to_string(result));
+ }
+
+ while (result == GNOME_VFS_OK) {
+Index: inkscape-0.43/src/libcroco/cr-statement.c
+===================================================================
+--- inkscape-0.43.orig/src/libcroco/cr-statement.c
++++ inkscape-0.43/src/libcroco/cr-statement.c
+@@ -2442,7 +2442,7 @@ cr_statement_dump_ruleset (CRStatement *
+ g_return_if_fail (a_fp && a_this);
+ str = cr_statement_ruleset_to_string (a_this, a_indent);
+ if (str) {
+- fprintf (a_fp, str);
++ fprintf (a_fp, "%s", str);
+ g_free (str);
+ str = NULL;
+ }
+@@ -2487,7 +2487,7 @@ cr_statement_dump_charset (CRStatement *
+ str = cr_statement_charset_to_string (a_this,
+ a_indent) ;
|