[Internal: prevent defect fixed - 51742 , 52071]
authorJooHark Park <juhaki.park@samsung.com>
Thu, 2 May 2013 06:27:01 +0000 (15:27 +0900)
committerJooHark Park <juhaki.park@samsung.com>
Thu, 2 May 2013 06:27:01 +0000 (15:27 +0900)
=====================================
[Problem]
-
[Cause]
-
[Solution]
- prevent defect fixed - 51742 , 52071
=====================================

Change-Id: I31b9a01dca227e2c56cf1a3a81d7dde04b1f7164

src/framework/utility/fw_compress.c
src/fw-plugins/common-public/vcalendar-task/src/plugin_interface.c

index 15875fc..494a1d8 100755 (executable)
@@ -225,9 +225,11 @@ EXPORT_API sync_agent_util_compress_result_e sync_agent_ua_uncompress(sync_agent
                        int command_len = strlen("tar xvfp \"") + strlen(input_file_path) + strlen("\" -C ") + strlen(output_direcory_path) +strlen(" delta.ua")+ 1;
                        int len = 0;
                        command = (char *)calloc(command_len, sizeof(char));
-                       memset(command, 0, sizeof(char)*command_len);
-                       if (command == NULL)
+                       if (command == NULL) {
                                return SYNC_AGENT_UTIL_COMPRESS_FAIL;
+                       } else {
+                               memset(command, 0, sizeof(char)*command_len);
+                       }
 
                        len = g_strlcat(command, "tar xvfp \"", command_len);
                        len = g_strlcat(command, input_file_path, command_len);
@@ -300,9 +302,11 @@ TAR_MV_EXECUTE:
                int command_len = strlen("mv \"") + strlen(input_file_path) + strlen("\" ") + strlen(output_direcory_path) +strlen("/delta.tar")+ 1;
                int len = 0;
                command = (char *)calloc(command_len, sizeof(char));
-               memset(command, 0, sizeof(char)*command_len);
-               if (command == NULL)
+               if (command == NULL) {
                        return SYNC_AGENT_UTIL_COMPRESS_FAIL;
+               } else {
+                       memset(command, 0, sizeof(char)*command_len);
+               }
 
                len = g_strlcat(command, "mv \"", command_len);
                len = g_strlcat(command, input_file_path, command_len);
index 3136fed..bc73f2f 100755 (executable)
@@ -635,8 +635,8 @@ EXPORT_API sync_agent_da_return_e sync_agent_plugin_reverse_converter(void *serv
        char *temp_agent_data = NULL;
 
        _DEBUG_INFO("converter start");
-       service_ret = calendar_list_create(&list);
-       goto_if(service_ret != CALENDAR_ERROR_NONE, "[vcalendar-task] calendar_list_create() Fail!: err[%d]", service_ret);
+       //service_ret = calendar_list_create(&list);
+       //goto_if(service_ret != CALENDAR_ERROR_NONE, "[vcalendar-task] calendar_list_create() Fail!: err[%d]", service_ret);
 
        // 1. extended vcalendar version : it should be excuted before calendar_vcalendar_make_from_records
        list = set_vcalendar_version(temp_service_data);