summaryrefslogtreecommitdiff
path: root/gladeui/glade-utils.h
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-12-21 11:03:17 -0500
committerJuan Pablo Ugarte <juanpablougarte@gmail.com>2013-12-21 17:20:50 -0300
commit259e506606f1804953182d1c1279c799ee10aede (patch)
tree6dc7836b9c4a16e03b6935c26ce73797d513b495 /gladeui/glade-utils.h
parent591a599631a638108024be516c4d8b0d84d50671 (diff)
downloadglade-259e506606f1804953182d1c1279c799ee10aede.tar.gz
gladeui: fix a pair of printf security problems
In two cases, gladeui was doing the equivalent of printf (var); instead of the correct (and safe): printf ("%s", var); This was caught by clang's pedantic treatment of non-literal format strings forcing me to add G_GNUC_PRINTF attributes to functions operating on format strings (which in turn caught the problem). Those changes are also included here. https://bugzilla.gnome.org/show_bug.cgi?id=720883
Diffstat (limited to 'gladeui/glade-utils.h')
-rw-r--r--gladeui/glade-utils.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gladeui/glade-utils.h b/gladeui/glade-utils.h
index 2eb7d9b5..ca02a5ba 100644
--- a/gladeui/glade-utils.h
+++ b/gladeui/glade-utils.h
@@ -28,11 +28,13 @@ typedef enum
gboolean glade_util_ui_message (GtkWidget *parent,
GladeUIMessageType type,
GtkWidget *widget,
- const gchar *format, ...);
+ const gchar *format,
+ ...) G_GNUC_PRINTF (4, 5);
void glade_util_flash_message (GtkWidget *statusbar,
guint context_id,
- gchar *format, ...);
+ gchar *format,
+ ...) G_GNUC_PRINTF (3, 4);
gboolean glade_util_url_show (const gchar *url);
GtkWidget *glade_util_file_dialog_new (const gchar *title,
GladeProject *project,