From 7ac42e76482acd687464f9dca2ef3ac7b67825a1 Mon Sep 17 00:00:00 2001 From: David Leonard Date: Wed, 26 Aug 2020 14:19:28 +1000 Subject: 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 --- src/mm-sms-part-cdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) { -- cgit v1.2.3