fix svace issues 00/102600/1
authorKyeonghun Lee <kh9090.lee@samsung.com>
Tue, 6 Dec 2016 07:27:28 +0000 (16:27 +0900)
committerKyeonghun Lee <kh9090.lee@samsung.com>
Tue, 6 Dec 2016 07:27:28 +0000 (16:27 +0900)
Change-Id: I9f465597bce48cb6e5b57fe6f34ba3b704780993
Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
plugin/mms_plugin/MmsPluginAppBase.cpp
plugin/mms_plugin/MmsPluginStorage.cpp
vobject-engine/VMessage.c

index ba1b6c37acbe40679083ae9e04cc1d7a6afecdf0..fa88de6b7277fef7748a86881c2dc437bb5a8cb3 100755 (executable)
@@ -67,9 +67,6 @@ void MmsPluginAppBase::getFirstPageTextFilePath(char *textBuf, int textBufSize)
 
        MMS_MESSAGE_DATA_S *pMmsMsgData = &mmsMsgData;
 
-       if (pMmsMsgData == NULL)
-               return;
-
        /* Get the text data from the 1st slide. */
        if (pMmsMsgData->pageCnt > 0) {
                pPage = _MsgMmsGetPage(pMmsMsgData, 0);
index ab8595e41c47e524da8068e205ba1df9fb564958..9b01f38d60903a4b3b55fae3a5f93b3d2a848a3a 100755 (executable)
@@ -1523,6 +1523,7 @@ msg_error_t MmsPluginStorage::getMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOP
                        pMsg->dataSize = mmsDataSize;
                } else {
                        MSG_ERR("MsgSerializeMms fail");
+                       err = MSG_ERR_MEMORY_ERROR;
                }
 
        } else {
index 2e0aeef1e85328771549a3cb9716d29980a6306d..04caf0c23efcf045e3c04d8c06a4c15c5e19da98 100755 (executable)
@@ -869,7 +869,8 @@ VTree* vmsg_decode(char *pMsgRaw)
                                                pVBody->pTop = NULL;
                                                pVBody->pCur = NULL;
                                                pVBody->pNext = NULL;
-                                               pCurrent->pNext = pVBody;
+                                               if (pCurrent)
+                                                       pCurrent->pNext = pVBody;
                                                pCurrent = pVBody;
                                        }
                                }
@@ -908,12 +909,14 @@ VTree* vmsg_decode(char *pMsgRaw)
                                memset(pTemp, 0, sizeof(VObject));
                                pTemp->property = type;
 
-                               if (pCurrent->pTop == NULL) {
-                                       pCurrent->pTop = pTemp;
-                                       pCurrent->pCur = pTemp;
-                               } else {
-                                       pCurrent->pCur->pSibling = pTemp;
-                                       pCurrent->pCur = pTemp;
+                               if (pCurrent) {
+                                       if (pCurrent->pTop == NULL) {
+                                               pCurrent->pTop = pTemp;
+                                               pCurrent->pCur = pTemp;
+                                       } else {
+                                               pCurrent->pCur->pSibling = pTemp;
+                                               pCurrent->pCur = pTemp;
+                                       }
                                }
 
                                break;