Mercurial > pidgin
diff libpurple/util.c @ 23652:27eacd38c721
Add NULL checking to purple_markup_linkify().
Display meanwhile announcements that don't have message text associated (I'm
not sure if this is right, the current code doesn't allow for that scenario).
Fixes #6518
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Thu, 07 Aug 2008 01:08:37 +0000 |
| parents | 399975ad001c |
| children | 187a3649f04b |
line wrap: on
line diff
--- a/libpurple/util.c Wed Aug 06 15:50:04 2008 +0000 +++ b/libpurple/util.c Thu Aug 07 01:08:37 2008 +0000 @@ -2031,8 +2031,12 @@ gunichar g; gboolean inside_html = FALSE; int inside_paren = 0; - GString *ret = g_string_new(""); - /* Assumes you have a buffer able to carry at least BUF_LEN * 2 bytes */ + GString *ret; + + if (text == NULL) + return NULL; + + ret = g_string_new(""); c = text; while (*c) {
