diff libpurple/protocols/sametime/sametime.c @ 20864:8f0dceea2ca4

Prevent null ptr deref (CID 346).
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 10 Oct 2007 01:09:55 +0000
parents 44b4e8bd759b
children bbcc9e206c43 3cc856ca2338 7821fa7b22db fc80a99f6f40
line wrap: on
line diff
--- a/libpurple/protocols/sametime/sametime.c	Wed Oct 10 00:54:35 2007 +0000
+++ b/libpurple/protocols/sametime/sametime.c	Wed Oct 10 01:09:55 2007 +0000
@@ -5563,7 +5563,7 @@
     msgA = _("No matches");
     msgB = _("The identifier '%s' did not match any users in your"
 	     " Sametime community.");
-    msg = g_strdup_printf(msgB, NSTR(res->name));
+    msg = g_strdup_printf(msgB, (res && res->name) ? NSTR(res->name) : "");
 
     purple_notify_error(gc, _("No Matches"), msgA, msg);