# HG changeset patch # User Mychaela Falconia # Date 1517725173 0 # Node ID 7f8f446db97ec5ff2bb2681b6a6654383e17a7d0 # Parent 97a72ec0a6c10ed506737a0dd54a5b07b3a2aa79 sms-pdu-decode: fixed bug in the decoding of From/To address fields diff -r 97a72ec0a6c1 -r 7f8f446db97e uptools/sms-pdu-decode/sms-pdu-decode.c --- a/uptools/sms-pdu-decode/sms-pdu-decode.c Sun Feb 04 06:05:04 2018 +0000 +++ b/uptools/sms-pdu-decode/sms-pdu-decode.c Sun Feb 04 06:19:33 2018 +0000 @@ -76,7 +76,7 @@ printf("Decode-Error: %s address > 20 digits\n", direction); return(-1); } - addr_field_len = ((pdu[pdu_ptr] + 1) >> 2) + 2; + addr_field_len = ((pdu[pdu_ptr] + 1) >> 1) + 2; if (pdu_ptr + addr_field_len > pdu_length) { printf("Decode-Error: %s address goes past PDU end\n", direction);