From 68198e97b6a6dd479e88fd1bd85a7b19cf67d149 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 7 Mar 2010 00:31:34 +0000 Subject: Two more fixes in OSCAR to avoid NULL pointers being passed to g_strcasecmp(). --- protocols/oscar/oscar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index 3aa9f136..f0e65f9a 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -1953,6 +1953,8 @@ static void oscar_get_away(struct im_connection *g, char *who) { static void oscar_set_away_aim(struct im_connection *ic, struct oscar_data *od, const char *state, const char *message) { + if (state == NULL) + state = ""; if (!g_strcasecmp(state, _("Visible"))) { aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NORMAL); @@ -2005,7 +2007,7 @@ static void oscar_set_away_icq(struct im_connection *ic, struct oscar_data *od, no_message = TRUE; } - if (!g_strcasecmp(state, "Online")) { + if (state == NULL) { aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NORMAL); } else if (!g_strcasecmp(state, "Away")) { aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY); -- cgit v1.2.3