=====================================
[Problem]
-
[Cause]
-
[Solution]
- Prevent 18801, 18802, 18808, 18810 patch
=====================================
Change-Id: I40c990b527aa0e1775fd05cfaff1992032b33eb0
/*get DevInfo */
Item *pItem = NULL;
ret = get_child_mo_list(DM_DEVINFO, &(*pReplaceCommand)->private.change.items);
/*get DevInfo */
Item *pItem = NULL;
ret = get_child_mo_list(DM_DEVINFO, &(*pReplaceCommand)->private.change.items);
+ _DEBUG_INFO("get_child_mo_list(%s) ret [%d]", DM_DEVINFO, ret);
if (ret != DM_OK)
goto error;
if (ret != DM_OK)
goto error;
char *targetUrl = NULL;
int isBase64 = 0;
char *nextNonce = NULL;
char *targetUrl = NULL;
int isBase64 = 0;
char *nextNonce = NULL;
- SyncML *pSyncML = NULL;
+
+ Command *pAlertCommand = NULL;
Command *pReplaceCommand = NULL;
Command *pReplaceCommand = NULL;
+ SyncML *pSyncML = NULL;
+ SyncHdr *pSyncHdr = NULL;
ret = __get_dmaccInfo(pServer_id, &client_id, &client_pwd, &sourceUrl, &targetUrl, &isBase64, &nextNonce);
if (ret != DM_OK)
ret = __get_dmaccInfo(pServer_id, &client_id, &client_pwd, &sourceUrl, &targetUrl, &isBase64, &nextNonce);
if (ret != DM_OK)
GList *commands_last = NULL;
/*SyncHdr */
GList *commands_last = NULL;
/*SyncHdr */
- SyncHdr *pSyncHdr = NULL;
+ //SyncHdr *pSyncHdr = NULL;
ret = create_syncml_hdr((*session), &pSyncHdr);
if (ret != DM_OK)
goto error;
ret = create_syncml_hdr((*session), &pSyncHdr);
if (ret != DM_OK)
goto error;
- Command *pAlertCommand = NULL;
+ //Command *pAlertCommand = NULL;
ret = create_alert_cmd((*session), syncType, &pAlertCommand);
if (ret != DM_OK)
goto error;
ret = create_alert_cmd((*session), syncType, &pAlertCommand);
if (ret != DM_OK)
goto error;
str_free(&contenttype);
str_free(&data);
str_free(&contenttype);
str_free(&data);
- if(pSyncML != NULL) { // prevent
- free_syncml(pSyncML);
- pSyncML = NULL;
- }
- str_free(&nextNonce); // prevent
+ str_free(&nextNonce);
+ free_command(pReplaceCommand);
+ free_syncml(pSyncML);
+ pSyncML = NULL;
+ free_synchdr(pSyncHdr);
+ pSyncHdr = NULL;
_INNER_FUNC_EXIT;
return ret;
_INNER_FUNC_EXIT;
return ret;
char *mac = NULL;
ret = gemerate_hmac(acc_info->auth_name, acc_info->auth_secret, nonce, nonce_size, xml, xml_len, &mac);
char *mac = NULL;
ret = gemerate_hmac(acc_info->auth_name, acc_info->auth_secret, nonce, nonce_size, xml, xml_len, &mac);
+ if (ret != DM_OK){
+ if(nonce != NULL) {
+ free(nonce);
+ nonce = NULL;
+ }
_DEBUG_VERBOSE("mac : %s", mac);
ret = create_hmac(acc_info->auth_name, "MD5", mac, session);
_DEBUG_VERBOSE("mac : %s", mac);
ret = create_hmac(acc_info->auth_name, "MD5", mac, session);
FormatType formatType = FORMAT_TYPE_UNKNOWN;
AuthType pAuthType = AUTH_TYPE_UNKNOWN;
char *credData = NULL;
FormatType formatType = FORMAT_TYPE_UNKNOWN;
AuthType pAuthType = AUTH_TYPE_UNKNOWN;
char *credData = NULL;
+ unsigned char *nextNonceDecode = NULL;
ret = get_dmacc_authType((*session)->pServer_id, &pAuthType);
if (ret != DM_OK)
ret = get_dmacc_authType((*session)->pServer_id, &pAuthType);
if (ret != DM_OK)
_DEBUG_VERBOSE("CHAL DOES NOT EXIST\n");
unsigned int out_len = 0;
_DEBUG_VERBOSE("CHAL DOES NOT EXIST\n");
unsigned int out_len = 0;
- unsigned char *nextNonceDecode = NULL;
+ //unsigned char *nextNonceDecode = NULL;
switch (pAuthType) {
case AUTH_TYPE_BASIC:{
switch (pAuthType) {
case AUTH_TYPE_BASIC:{
_DEBUG_VERBOSE("CHAL DOES EXIST\n");
unsigned int out_len = 0;
_DEBUG_VERBOSE("CHAL DOES EXIST\n");
unsigned int out_len = 0;
- unsigned char *nextNonceDecode = NULL;
+ //unsigned char *nextNonceDecode = NULL;
if ((*session)->res_chal->type == AUTH_TYPE_HMAC) {
(*session)->isHMAC = 1;
if ((*session)->res_chal->type == AUTH_TYPE_HMAC) {
(*session)->isHMAC = 1;
ret = nonce_decode(chal->nonce_plain, &nextNonceDecode, &out_len);
_DEBUG_VERBOSE("nonce result : %d", ret);
_DEBUG_VERBOSE("nextnonceDecode : %s, out len : %d", nextNonceDecode, out_len);
ret = nonce_decode(chal->nonce_plain, &nextNonceDecode, &out_len);
_DEBUG_VERBOSE("nonce result : %d", ret);
_DEBUG_VERBOSE("nextnonceDecode : %s, out len : %d", nextNonceDecode, out_len);
}
ret = create_auth_credString(chal->type, client_id, client_pwd, chal->type == AUTH_TYPE_BASIC ? (const unsigned char *)(chal->nonce_b64) : (const unsigned char *)(nextNonceDecode), out_len, &credData);
if (ret != DM_OK)
}
ret = create_auth_credString(chal->type, client_id, client_pwd, chal->type == AUTH_TYPE_BASIC ? (const unsigned char *)(chal->nonce_b64) : (const unsigned char *)(nextNonceDecode), out_len, &credData);
if (ret != DM_OK)
if (ret != DM_OK)
goto error;
if (ret != DM_OK)
goto error;
+ if(nextNonceDecode != NULL) {
+ free(nextNonceDecode);
+ nextNonceDecode = NULL;
+ }
_INNER_FUNC_EXIT;
return ret;
error:
_DEBUG_VERBOSE(" end error %d \n", ret);
_INNER_FUNC_EXIT;
return ret;
error:
_DEBUG_VERBOSE(" end error %d \n", ret);
+ if(nextNonceDecode != NULL) {
+ free(nextNonceDecode);
+ nextNonceDecode = NULL;
+ }
_INNER_FUNC_EXIT;
return ret;
}
_INNER_FUNC_EXIT;
return ret;
}