mirror of git://git.sysmocom.de/ofono
sms: Don't crash when encoding fails
This commit is contained in:
parent
a05ebc93ab
commit
348bdb7f1d
|
@ -1138,7 +1138,11 @@ static gboolean compute_incoming_msgid(GSList *sms_list,
|
|||
for (l = sms_list; l; l = l->next) {
|
||||
s = l->data;
|
||||
|
||||
sms_encode(s, &len, NULL, buf);
|
||||
if (sms_encode(s, &len, NULL, buf) == FALSE) {
|
||||
g_checksum_free(checksum);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_checksum_update(checksum, buf, len);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue