Openmoko Bug #1728: SMS parser bug?

Openmoko Public Trac bugs at
Mon Aug 25 12:29:19 CEST 2008

#1728: SMS parser bug?
    Reporter:  odlg    |        Owner:  tick    
        Type:  defect  |       Status:  accepted
    Priority:  high    |    Milestone:          
   Component:  Qtopia  |      Version:  Om2008.8
    Severity:  major   |   Resolution:          
    Keywords:          |    Blockedby:          
Reproducible:          |     Blocking:          

Comment(by tick):

 I think in Qtopia it will to view the semi-octet address length as the
 string length of the 7-packed string.
 (The unit of getOctets is byte ~_~)
 I think its wrong.
 according to 3GPP-TS 23.40
 ''The Address-Length field is an integer representation of the number of
 useful semi-octets within the Address-Value
 field, i.e. excludes any semi octet containing only fill bits.''

 for 'sipgate' shall be 14 octets with 8 bit pack and 13 with 7-pack
 that why the address length is 0x0D.

 In Qtopia it tried to access 13 bytes instead, I think that's why I can
 see 'google' on the screenshot and some other stuff, and why messages are

 The following patch is my fix through my guess, it is *NOT* tested yet.
 Holger would you test this for me?
 I cannot reproduce this issues easily in Taiwan, and only can guess.
 However, if the length of message is odd, it seems will cause trouble.
 (Still need to check)

 diff --git a/src/libraries/qtopiaphone/qsmsmessage.cpp
 index 1b05131..4adbef3 100644
 --- a/src/libraries/qtopiaphone/qsmsmessage.cpp
 +++ b/src/libraries/qtopiaphone/qsmsmessage.cpp
 @@ -1872,9 +1872,7 @@ QString QPDUMessage::address(bool SCAddress)

          if ( !SCAddress ) {
 -            if ( at != SMS_Address_AlphaNumeric ) {
 -                len = len / 2 + (len % 2);
 -            }
 +            len = len / 2 + (len % 2);
          } else {

Ticket URL: <> <>
openmoko trac

More information about the buglog mailing list