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 ba1b6c3..fa88de6 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 ab8595e..9b01f38 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 2e0aeef..04caf0c 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;