Patch for some initialization issue 91/174191/1 accepted/tizen/4.0/unified/20180330.060753 submit/tizen_4.0/20180329.043953
authorSunmin Lee <sunm.lee@samsung.com>
Thu, 29 Mar 2018 04:27:45 +0000 (13:27 +0900)
committerSunmin Lee <sunm.lee@samsung.com>
Thu, 29 Mar 2018 04:27:45 +0000 (13:27 +0900)
- Initialize local variable
- Release 1.2.2

Change-Id: Idc468883b77cf319efdff7ba64aecc5bf006fe29
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
packaging/libtota.spec
ss_engine/SS_UPI.c

index 3a8408c..f0cde90 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          libtota
 Summary:       fota update library
-Version:       1.2.1
+Version:       1.2.2
 Release:       0
 Group:         System
 License:       Apache-2.0 and BSD-2-Clause and BSD-3-Clause and PD
index b0b854a..09596cb 100755 (executable)
@@ -297,10 +297,10 @@ int SS_verify_DELTA_image(char *filename)
        FileInfo file;
        FILE *fp = NULL;
        char line[SS_TOKEN_MAXLINE_LEN] = { '\0' };
-       char * delta_size = NULL;
+       char *delta_size = NULL;
        char *signature = NULL;
-       char * sha1trg = NULL;
-       char *saveptr;
+       char *sha1trg = NULL;
+       char *saveptr = NULL;
        uint8_t target_sha1[SHA_DIGEST_SIZE] = { 0, };
        char cmd[512] = { 0, };
        char buf[256];
@@ -405,7 +405,7 @@ int SS_Get_last_update_status(int* last_update_status, int* del_type)
        int fd;
        unsigned char buf[256];
        char *ptr = NULL;
-       char *saveptr;
+       char *saveptr = NULL;
        int result = 0;
 
        if (file_exist(SS_UPDATE_STATUR_PATH) == 0) {
@@ -778,7 +778,7 @@ struct details *SS_FSGetDeltaCount(char *ubDeltaPath, char *ubDeltaInfoFile)
        char *FileData = NULL;
        int data_size = -1;
        char *line = NULL;
-       char *saveptr;
+       char *saveptr = NULL;
        char buf[256];
        struct details *refer_copy = NULL;
        FILE *filename_bkup = NULL;
@@ -954,7 +954,7 @@ fs_list *SS_FSBuildNodes(ua_dataSS_t * ua_dataSS)
        char *sha1trg = NULL;
        char *change_type = NULL;
        char *file_type = NULL;
-       char *saveptr;
+       char *saveptr = NULL;
        uint32_t ulPatchCount = 0, del_type = DELETES;
        fs_params *fs_diffhead = NULL;
        fs_params *fs_difftail = NULL;
@@ -1314,7 +1314,7 @@ int SS_FSSetAttributes(ua_dataSS_t * ua_dataSS)
        }
 
        while (pline) {
-               char *saveptr_pline;
+               char *saveptr_pline = NULL;
                pfilePath = strtok_r(pline, "\"", &saveptr_pline);
 
                if (pfilePath && strcmp(pfilePath, SS_FWSLASH) == 0) {