diff options
author | David Leonard <David.Leonard@digi.com> | 2020-08-26 14:19:28 +1000 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-11-20 00:41:42 +0100 |
commit | 30b13bd23073b64ae686fa6dfd6afb244be9c9d0 (patch) | |
tree | 411312104ed33b4c9995a0c94236e8c3f8c33997 | |
parent | bd43afa6bc0eca0973ec8058b7c26d9396020a04 (diff) |
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
(cherry picked from commit 7ac42e76482acd687464f9dca2ef3ac7b67825a1)
-rw-r--r-- | src/mm-sms-part-cdma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mm-sms-part-cdma.c b/src/mm-sms-part-cdma.c index 6e3f1179..e08193cf 100644 --- a/src/mm-sms-part-cdma.c +++ b/src/mm-sms-part-cdma.c @@ -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++) { |