libpurple/protocols/msn/oim.c

branch
release-2.5.5.veracode
changeset 25697
738e31fc6b51
parent 25379
ccf2a1e230b0
child 25749
721111ae1000
child 27112
566e9c9fe1df
--- a/libpurple/protocols/msn/oim.c	Sat May 02 19:21:11 2009 +0000
+++ b/libpurple/protocols/msn/oim.c	Sat May 02 19:33:22 2009 +0000
@@ -668,9 +668,15 @@
 		if (tokens[1] != NULL)
 			from = (const char *)tokens[1];
 
-		start = strchr(from, '<') + 1;
-		end = strchr(from, '>');
-		passport = g_strndup(start, end - start);
+		start = strchr(from, '<');
+		if (start != NULL) {
+			start++;
+			end = strchr(from, '>');
+			if (end != NULL)
+				passport = g_strndup(start, end - start);
+		}
+		if (passport == NULL)
+			passport = g_strdup(_("Unknown"));
 
 		g_strfreev(tokens);
 	}

mercurial