mirror of git://git.sysmocom.de/ofono
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
This commit is contained in:
parent
2982a7962f
commit
fe486efadd
12
src/ussd.c
12
src/ussd.c
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue