aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-03-07 00:31:34 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2010-03-07 00:31:34 +0000
commit68198e97b6a6dd479e88fd1bd85a7b19cf67d149 (patch)
tree3e2af4ba7c96c5e5bf372bf721cda41683e6c452
parent58adb7e800db87c1e38b810c288f1455654dab3d (diff)
Two more fixes in OSCAR to avoid NULL pointers being passed to
g_strcasecmp().
-rw-r--r--protocols/oscar/oscar.c4
1 files changed, 3 insertions, 1 deletions
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);