Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1515

Crash during QMessage::appendAttachments()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 1.2.0
    • 1.2.x
    • Messaging
    • None
    • Symbian, Nokia N8 SW version 2011.13, Qt 4.7.2 + qt-mobility:master
    • 0aa86dafe9cb132a40394777f19d8ce3a2a301d1

    Description

      There is an USER 23 crash during QMessage::appendAttachments(). Crash happens when adding as attachment compressed exe file.
      To reproduce and analyse code please refer to CreateMessage test application in attachment.
      Before executing test configure one mailbox. Test account: hardstuff12@gmail.com, password: 123xbest.

      Panic USER 23 is raised when any operation that moves or copies data to an 8 bit variant descriptor, causes the length of that descriptor to exceed its maximum length.
      Problem originates form QMessageContentContainerPrivate::createAttachment() in qmessagecontentcontainer_symbian.cpp:

      • TBuf8<20> fileType variable's maximum length is too short. It should be crearted dymanicaly with length of fileDataType.iDataType.Des8().
        In tested case, compresed exe file is recognized as "application/x-zip-compressed", length of this string is 28 chars.
          TBuf8<20> fileType;
          TPtrC8 ptr8((TUint8 *)(_content.constData()), _content.length());
          if(session.Connect() == KErrNone){                        
              TDataRecognitionResult fileDataType;                     
              session.RecognizeData(filePtr, ptr8, fileDataType);                                         
              fileType.Copy(fileDataType.iDataType.Des8());
              mimeType = QByteArray((const char*)fileType.Ptr(), fileType.Length());
              session.Close();                
          }
      
      • declered variables are not used
            QString type;
            TBuf8<255> fileBuffer;
        

      Attachments

        Activity

          People

            sanders Don Sanders (closed Nokia identity) (Inactive)
            szewczyk Pawel Szewczyk
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: