1 From 5c4fbd80accf435889b6f7b16eae14b47a6cba09 Mon Sep 17 00:00:00 2001
2 From: Caiwen Zhang <caiwen.zhang@intel.com>
3 Date: Tue, 25 Sep 2012 21:28:07 +0800
4 Subject: [PATCH 08/23] Fix SCA(service center address) length checking error
5 Content-Type: text/plain; charset="utf-8"
6 Content-Transfer-Encoding: 8bit
8 For the address field used by SM-RL(short message relay layer),
9 the length byte represents octets of the whole field(include itself
10 and TOA byte - type of address). Please refer to 3GPP 31.102 4.2.27
11 and 3GPP 24.011 8.2.5.2
13 For the address field used by SM-TP(transfer layer), the length
14 represents semi-octets within the address(exclude itself and TOA
15 byte). Please refer to 3GPP 23.040 9.1.2.5.
17 SCA is an address filed of SM-RL. SMS_MAX_SMS_SERVICE_CENTER_ADDR
20 But currently in the struct telephony_sms_DataPaclageInfo, SM-TP
21 address filed is used to represent the SCA.
23 As we currently can't access libtcore and msg_service packages,
24 temporarily change the SCA length checking here to make SMS sending
28 1 file changed, 1 insertion(+), 1 deletion(-)
30 diff --git a/src/s_sms.c b/src/s_sms.c
31 index 874f08e..2b3cd4f 100644
34 @@ -2218,7 +2218,7 @@ static TReturn send_umts_msg(CoreObject *obj, UserRequest *ur)
36 if ((sendUmtsMsg->msgDataPackage.msgLength > 0)
37 && (sendUmtsMsg->msgDataPackage.msgLength <= SMS_SMDATA_SIZE_MAX)
38 - && (ScLength <= SMS_SCADDRESS_LEN_MAX)) {
39 + && (ScLength <= (SMS_MAX_SMS_SERVICE_CENTER_ADDR - 2) * 2)) {
40 if (ScLength == 0) { // ScAddress not specified