diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-06-18 16:55:07 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-06-18 16:58:08 -0500 |
commit | fe486efadd33a15dd02fb37e0764f1f3535208bb (patch) | |
tree | 84d51049e7a226b62c9c5f0cf64f7ed66960a816 /src/ussd.c | |
parent | 2982a7962f63801923443eeb87c2fd7c97a709a4 (diff) | |
download | ofono-fe486efadd33a15dd02fb37e0764f1f3535208bb.tar.bz2 |
Fix another logic bug in SS parser
If the passwords do not match, it is still a recognized string,
but we must return invalid format
Diffstat (limited to 'src/ussd.c')
-rw-r--r-- | src/ussd.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -274,9 +274,17 @@ static gboolean recognized_passwd_change_string(struct ofono_modem *modem, return FALSE; } - if (strcmp(sc, "03") || strlen(dn) || strcmp(sic, sid)) + if (strcmp(sc, "03") || strlen(dn)) return FALSE; + /* If SIC & SID don't match, then we just bail out here */ + if (strcmp(sic, sid)) { + DBusConnection *conn = dbus_gsm_connection(); + DBusMessage *reply = dbus_gsm_invalid_format(msg); + g_dbus_send_message(conn, reply); + return TRUE; + } + while ((l = g_slist_find_custom(l, sia, ss_passwd_entry_find_by_service)) != NULL) { struct ss_passwd_entry *entry = l->data; @@ -317,7 +325,7 @@ static gboolean recognized_control_string(struct ofono_modem *modem, goto out; } - if (*sid != '\0'); + if (*sid != '\0') goto out; while ((l = g_slist_find_custom(l, sc, |