From: Seunghwan Lee Date: Mon, 14 Jan 2013 04:51:21 +0000 (+0900) Subject: Fixed Prevent Bug X-Git-Tag: accepted/tizen_2.1/20130425.035101~14^2~21^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=befb99a8dd4abd913cd0699e550f1967d75a69ba;p=framework%2Fmessaging%2Fmsg-service.git Fixed Prevent Bug --- diff --git a/plugin/mms_plugin/MmsPluginDecode.cpp b/plugin/mms_plugin/MmsPluginDecode.cpp index 0d24ece..7365738 100755 --- a/plugin/mms_plugin/MmsPluginDecode.cpp +++ b/plugin/mms_plugin/MmsPluginDecode.cpp @@ -2151,6 +2151,9 @@ static bool __MmsBinaryDecodeMultipart(FILE *pFile, char *szFilePath, MsgType *p goto __CATCH; } + if (pMsgBody->body.pMultipart != NULL) + pLastMultipart = pMsgBody->body.pMultipart; + while (nEntries) { MSG_DEBUG("decoding %dth multipart\n", index); @@ -2181,13 +2184,9 @@ static bool __MmsBinaryDecodeMultipart(FILE *pFile, char *szFilePath, MsgType *p presentationInfo.pCurPresentation = pMultipart; } - if (pMsgBody->body.pMultipart == NULL) { - /* first multipart */ - pMsgBody->body.pMultipart = pMultipart; - } - if (pLastMultipart == NULL) { /* first multipart */ + pMsgBody->body.pMultipart = pMultipart; pLastMultipart = pMultipart; pPreMultipart = NULL; } else { @@ -5579,10 +5578,11 @@ static bool __MsgResolveNestedMultipart(MsgType *pPartType, MsgBody *pPartBody) goto __CATCH; } - if (pSelectedPart->pBody != NULL) - memcpy(pPartBody, pSelectedPart->pBody, sizeof(MsgBody)); - if (pSelectedPart != NULL) { + + if (pSelectedPart->pBody != NULL) + memcpy(pPartBody, pSelectedPart->pBody, sizeof(MsgBody)); + #ifdef __SUPPORT_DRM__ MmsReleaseMsgDRMInfo(&pSelectedPart->type.drmInfo); #endif