summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Leonard <David.Leonard@digi.com>2020-08-26 14:19:28 +1000
committerAleksander Morgado <aleksander@aleksander.es>2020-11-20 00:40:39 +0100
commit7ac42e76482acd687464f9dca2ef3ac7b67825a1 (patch)
tree62053dd95c79343beb18446ae58beab6f5e4cb3c
parentc3bc515b8a8eb77b3517cc96827fa48573459dd8 (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
-rw-r--r--src/mm-sms-part-cdma.c2
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++) {