From: Kyeonghun Lee Date: Thu, 11 Feb 2016 06:55:27 +0000 (+0900) Subject: alloc-dealloc mismatch bug fixed X-Git-Tag: accepted/tizen/ivi/20160218.023748 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Ftags%2Faccepted%2Ftizen%2Fivi%2F20160218.023748;p=platform%2Fcore%2Fmessaging%2Fmsg-service.git alloc-dealloc mismatch bug fixed Change-Id: Ie1ff7f77182d235705672a64e01ff5a763945e6e Signed-off-by: Kyeonghun Lee --- diff --git a/plugin/sms_plugin/SmsPluginParamCodec.cpp b/plugin/sms_plugin/SmsPluginParamCodec.cpp index bb40be6..a3d7709 100755 --- a/plugin/sms_plugin/SmsPluginParamCodec.cpp +++ b/plugin/sms_plugin/SmsPluginParamCodec.cpp @@ -112,7 +112,7 @@ int SmsPluginParamCodec::encodeTime(const SMS_TIMESTAMP_S *pTimeStamp, char **pp int SmsPluginParamCodec::encodeDCS(const SMS_DCS_S *pDCS, char **ppParam) { - *ppParam = new char; + *ppParam = new char[MAX_DCS_PARAM_LEN]; **ppParam = 0x00; @@ -164,7 +164,7 @@ int SmsPluginParamCodec::encodeDCS(const SMS_DCS_S *pDCS, char **ppParam) return 0; } - return 1; + return MAX_DCS_PARAM_LEN; } diff --git a/plugin/sms_plugin/include/SmsPluginTypes.h b/plugin/sms_plugin/include/SmsPluginTypes.h index 3d74b7e..646947f 100755 --- a/plugin/sms_plugin/include/SmsPluginTypes.h +++ b/plugin/sms_plugin/include/SmsPluginTypes.h @@ -43,6 +43,7 @@ extern "C" #define MAX_SMS_SEND_RETRY 4 #define MAX_SMSC_LEN 20 #define MAX_ADD_PARAM_LEN 12 +#define MAX_DCS_PARAM_LEN 1 #define MAX_ABS_TIME_PARAM_LEN 7 #define MAX_REL_TIME_PARAM_LEN 1 #define MAX_UD_HEADER_NUM 7