FreeCalypso > hg > freecalypso-tools
comparison uptools/sms-pdu-decode/sms-pdu-decode.c @ 339:7f8f446db97e
sms-pdu-decode: fixed bug in the decoding of From/To address fields
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 04 Feb 2018 06:19:33 +0000 |
parents | 560af437a429 |
children | bae0fd7285dd |
comparison
equal
deleted
inserted
replaced
338:97a72ec0a6c1 | 339:7f8f446db97e |
---|---|
74 } | 74 } |
75 if (pdu[pdu_ptr] > 20) { | 75 if (pdu[pdu_ptr] > 20) { |
76 printf("Decode-Error: %s address > 20 digits\n", direction); | 76 printf("Decode-Error: %s address > 20 digits\n", direction); |
77 return(-1); | 77 return(-1); |
78 } | 78 } |
79 addr_field_len = ((pdu[pdu_ptr] + 1) >> 2) + 2; | 79 addr_field_len = ((pdu[pdu_ptr] + 1) >> 1) + 2; |
80 if (pdu_ptr + addr_field_len > pdu_length) { | 80 if (pdu_ptr + addr_field_len > pdu_length) { |
81 printf("Decode-Error: %s address goes past PDU end\n", | 81 printf("Decode-Error: %s address goes past PDU end\n", |
82 direction); | 82 direction); |
83 return(-1); | 83 return(-1); |
84 } | 84 } |