mirror of git://git.sysmocom.de/ofono
sim: validate IMS private identity
Make sure that IMS private identity is a valid UTF8 string before setting sim->impi field. Otherwise ofono may crash on dbus assert when SIM properties are reported via org.ofono.SimManager interface.
This commit is contained in:
parent
bae8ebe907
commit
7a62b554ab
|
@ -1664,7 +1664,8 @@ static void impi_read_cb(int ok, int total_length, int record,
|
|||
return;
|
||||
}
|
||||
|
||||
sim->impi = g_strndup((const char *)data + 2, data[1]);
|
||||
if (validate_utf8_tlv(data))
|
||||
sim->impi = g_strndup((const char *)data + 2, data[1]);
|
||||
}
|
||||
|
||||
static void discover_apps_cb(const struct ofono_error *error,
|
||||
|
|
Loading…
Reference in New Issue