Fix prevent issue.
authorSangkoo Kim <sangkoo.kim@samsung.com>
Wed, 23 Oct 2013 11:32:34 +0000 (20:32 +0900)
committerSangkoo Kim <sangkoo.kim@samsung.com>
Wed, 23 Oct 2013 11:32:34 +0000 (20:32 +0900)
Change-Id: I4d46c6a843a90cc076ed1380027c29a356f9367e

framework/storage-handler/MsgStorageManager.cpp
framework/storage-handler/MsgStorageMessage.cpp
plugin/sms_plugin/SmsPluginWapPushHandler.cpp
utils/MsgDrmWrapper.cpp
vobject-engine/VCard.c

index f5837d1..72d4c83 100755 (executable)
@@ -924,7 +924,8 @@ msg_error_t MsgStoUpdateMms(MSG_MESSAGE_INFO_S *pMsg)
                dbHandle.finalizeQuery();
                dbHandle.endTrans(true);
        } else {
-               MsgStoUpdateMMSMessage(pMsg);
+               if (MsgStoUpdateMMSMessage(pMsg) != MSG_SUCCESS)
+                       MSG_DEBUG("MsgStoUpdateMMSMessage is failed");
        }
        return MSG_SUCCESS;
 }
index c9dc0b8..834ce08 100755 (executable)
@@ -674,8 +674,8 @@ msg_error_t MsgStoDeleteMessage(msg_message_id_t msgId, bool bCheckIndication)
                }
        } else if (msgType.mainType == MSG_MMS_TYPE) {
 
-               char filePath[MSG_FILEPATH_LEN_MAX] = {0,};
-               char dirPath[MSG_FILEPATH_LEN_MAX]= {0,};
+               char filePath[MSG_FILEPATH_LEN_MAX+1] = {0,};
+               char dirPath[MSG_FILEPATH_LEN_MAX+1]= {0,};
 
                memset(sqlQuery, 0x00, sizeof(sqlQuery));
                snprintf(sqlQuery, sizeof(sqlQuery), "SELECT FILE_PATH FROM %s WHERE MSG_ID = %d;",
index 5bffa64..3596afa 100755 (executable)
@@ -3179,7 +3179,7 @@ void SmsPluginWapPushHandler::wspHeaderDecodeDateValue( unsigned long length, un
 
        /* check date value validity */
        {
-               if (( pTMData->tm_wday > 6 ) || (pTMData->tm_mon > 12 ) || (pTMData->tm_mday >  31 ))
+               if (( pTMData->tm_wday > 6 ) || (pTMData->tm_mon > 11 ) || (pTMData->tm_mday >  31 ))
                {
                        MSG_DEBUG( "WspLHeaderDecodeDateValue: Date decode fail %d, %d, %d \n", pTMData->tm_wday, pTMData->tm_mon, pTMData->tm_mday );
                        strncpy( (char*)*pDecodedString, "Decoding Failed", WSP_STANDARD_STR_LEN_MAX-1);
index 7c3c572..48114ac 100755 (executable)
@@ -189,7 +189,7 @@ bool MsgDrmGetContentID(const char *szFileName, char *szContentID, int nContentI
 
        char strTemp[MSG_MAX_DRM_FILE_PATH + 1] = {0,};
 
-       strncpy(strTemp, szFileName, sizeof(strTemp));
+       strncpy(strTemp, szFileName, MSG_MAX_DRM_FILE_PATH);
 
        drm_content_info_s  content_info;
        memset(&content_info, 0x00, sizeof(drm_content_info_s));
index d6cab9d..a6f1892 100755 (executable)
@@ -600,10 +600,10 @@ __VCardGetParamVal( char* pVCardRaw, int* pStatus, int* pDLen )
 
        pBuf = (char *)malloc(len);
        if(len < 1 || (pBuf  == NULL)) {
-               if (pBuf) {
-                       free(pBuf);
-                       pBuf = NULL;
-               }
+//             if (pBuf) {
+//                     free(pBuf);
+//                     pBuf = NULL;
+//             }
 
                return NULL;
        }
@@ -904,6 +904,7 @@ vcard_decode( char *pCardRaw )
                                                if(start_status == 1) {
                                                        goto CATCH;
                                                }
+
                                                if ( ( pVCard = ( VTree* )malloc( sizeof( VTree ) ) ) == NULL ) {
                                                        start_status = 1;
                                                        goto CATCH;