Description: prevend gcc format-security errors Author: Jörg Frings-Fürst Forwarded: https://sourceforge.net/p/xtrkcad-fork/bugs/163/ Last-Update: 2016-12-29 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ Index: trunk/app/wlib/gtklib/gtktext.c =================================================================== --- trunk.orig/app/wlib/gtklib/gtktext.c +++ trunk/app/wlib/gtklib/gtktext.c @@ -448,7 +448,7 @@ EXPORT wBool_t wTextPrint( dialog = gtk_message_dialog_new (GTK_WINDOW (gtkMainW->gtkwin), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, - error->message); + "%s", error->message); g_error_free (error); gtk_dialog_run (GTK_DIALOG (dialog)); Index: trunk/app/wlib/gtklib/print.c =================================================================== --- trunk.orig/app/wlib/gtklib/print.c +++ trunk/app/wlib/gtklib/print.c @@ -120,7 +120,7 @@ WlibApplySettings( GtkPrintOperation *op dialog = gtk_message_dialog_new (GTK_WINDOW (gtkMainW->gtkwin), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, - err->message); + "%s", err->message); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } else { @@ -142,7 +142,7 @@ WlibApplySettings( GtkPrintOperation *op dialog = gtk_message_dialog_new (GTK_WINDOW (gtkMainW->gtkwin), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, - err->message); + "%s", err->message); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } else { @@ -184,7 +184,7 @@ WlibSaveSettings( GtkPrintOperation *op dialog = gtk_message_dialog_new (GTK_WINDOW (gtkMainW->gtkwin), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, - err->message); + "%s", err->message); g_error_free (err); gtk_dialog_run (GTK_DIALOG (dialog)); @@ -202,7 +202,7 @@ WlibSaveSettings( GtkPrintOperation *op dialog = gtk_message_dialog_new (GTK_WINDOW (gtkMainW->gtkwin), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, - err->message); + "%s", err->message); g_error_free (err); gtk_dialog_run (GTK_DIALOG (dialog)); @@ -824,7 +824,7 @@ doPrintJobFinished( GtkPrintJob *job, vo dialog = gtk_message_dialog_new (GTK_WINDOW (gtkMainW->gtkwin), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, - err->message); + "%s", err->message); } }