sms: fix 7-bit ASCII SMS decoding

Fixes an issue where (5+8n)-character long SMS messages received on a
CDMA network would be dropped with a "cannot read user data" error,
while other length SMS messages would be delivered fine.

Fix thanks to Peter Hunt
This commit is contained in:
David Leonard
2020-08-26 14:19:28 +10:00
committed by Aleksander Morgado
parent c3bc515b8a
commit 7ac42e7648

View File

@@ -846,7 +846,7 @@ read_bearer_data_user_data (MMSmsPart *sms_part,
gchar *text;
guint i;
SUBPARAMETER_SIZE_CHECK (byte_offset + 1 + ((bit_offset + (num_fields * 7)) / 8));
SUBPARAMETER_SIZE_CHECK (byte_offset + ((bit_offset + (num_fields * 7)) / 8));
text = g_malloc (num_fields + 1);
for (i = 0; i < num_fields; i++) {