svace issue fixed 88/103688/1
authorKyeonghun Lee <kh9090.lee@samsung.com>
Fri, 9 Dec 2016 06:56:30 +0000 (15:56 +0900)
committerKyeonghun Lee <kh9090.lee@samsung.com>
Fri, 9 Dec 2016 06:56:30 +0000 (15:56 +0900)
- add null check for strstr() return value

Change-Id: I2744817a288718159c097478ebf15874a8abb572
Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
framework/transaction-manager/MsgCmdHandlerTransport.cpp

index 8ad9f7c..9f5da09 100755 (executable)
@@ -119,7 +119,8 @@ int MsgSubmitReqHandler(const MSG_CMD_S *pCmd, char **ppEvent)
 
                char* pFileName;
                pFileName = strstr(reqInfo.msgInfo.msgData, "MSG_");
-               strncpy(trId.pduFileName, pFileName, MAX_COMMON_INFO_SIZE);
+               if (pFileName)
+                       strncpy(trId.pduFileName, pFileName, MAX_COMMON_INFO_SIZE);
 
                MSG_SEC_DEBUG("java MMS msg trId:%s filepath:%s", trId.id, reqInfo.msgInfo.msgData);