aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-string-parser.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2010-03-05 01:11:26 +0800
committerXavier Claessens <xclaesse@gmail.com>2010-03-05 01:14:55 +0800
commitba5b7807abcbd86cc9d35440754b68a3fe970f18 (patch)
tree33cff9bea880ac0af5872d5a7cbb674e28a27803 /libempathy-gtk/empathy-string-parser.c
parent02e330c0418f6b59abe193171d7adc75739bd8a2 (diff)
downloadgsoc2013-empathy-ba5b7807abcbd86cc9d35440754b68a3fe970f18.tar
gsoc2013-empathy-ba5b7807abcbd86cc9d35440754b68a3fe970f18.tar.gz
gsoc2013-empathy-ba5b7807abcbd86cc9d35440754b68a3fe970f18.tar.bz2
gsoc2013-empathy-ba5b7807abcbd86cc9d35440754b68a3fe970f18.tar.lz
gsoc2013-empathy-ba5b7807abcbd86cc9d35440754b68a3fe970f18.tar.xz
gsoc2013-empathy-ba5b7807abcbd86cc9d35440754b68a3fe970f18.tar.zst
gsoc2013-empathy-ba5b7807abcbd86cc9d35440754b68a3fe970f18.zip
empathy_add_link_markup() is not NULL-safe
Add a g_return_val_if_fail() to avoid crash, and avoid calling that func with NULL text.
Diffstat (limited to 'libempathy-gtk/empathy-string-parser.c')
-rw-r--r--libempathy-gtk/empathy-string-parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-string-parser.c b/libempathy-gtk/empathy-string-parser.c
index fa56a2d42..5c3fb1972 100644
--- a/libempathy-gtk/empathy-string-parser.c
+++ b/libempathy-gtk/empathy-string-parser.c
@@ -201,6 +201,8 @@ empathy_add_link_markup (const gchar *text)
};
GString *string;
+ g_return_val_if_fail (text != NULL, NULL);
+
string = g_string_sized_new (strlen (text));
empathy_string_parser_substr (text, -1, parsers, string);