summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Wasilczyk <twasilczyk@pidgin.im>2014-11-23 00:03:11 +0100
committerTomasz Wasilczyk <twasilczyk@pidgin.im>2014-11-23 00:03:11 +0100
commit0de941e5c628de91a5447e469def2c7b5a8cf671 (patch)
tree10c2d9e7509fa5d98c427a7457ae97bcc4a89251
parent73c9c2d48be79228a696c32d3dc76e22a8b7eab3 (diff)
downloadpidgin-0de941e5c628de91a5447e469def2c7b5a8cf671.tar.gz
Gadu-Gadu: handle invalid debug prints. Refs #16471v2.10.11
-rw-r--r--libpurple/protocols/gg/gg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libpurple/protocols/gg/gg.c b/libpurple/protocols/gg/gg.c
index d923e88b7a..14c56c8c99 100644
--- a/libpurple/protocols/gg/gg.c
+++ b/libpurple/protocols/gg/gg.c
@@ -2369,6 +2369,14 @@ static void purple_gg_debug_handler(int level, const char * format, va_list args
PurpleDebugLevel purple_level;
char *msg = g_strdup_vprintf(format, args);
+ if (!msg) {
+ purple_debug_fatal("gg",
+ "failed to vprintf the following message: %s",
+ format ? format : "(null)\n");
+
+ return;
+ }
+
/* This is pretty pointless since the GG_DEBUG levels don't correspond to
* the purple ones */
switch (level) {