From: Sunmin Lee Date: Thu, 29 Mar 2018 04:27:45 +0000 (+0900) Subject: Patch for some initialization issue X-Git-Tag: accepted/tizen/4.0/unified/20180330.060753^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F91%2F174191%2F1;p=platform%2Fcore%2Fsystem%2Flibtota.git Patch for some initialization issue - Initialize local variable - Release 1.2.2 Change-Id: Idc468883b77cf319efdff7ba64aecc5bf006fe29 Signed-off-by: Sunmin Lee --- diff --git a/packaging/libtota.spec b/packaging/libtota.spec index 3a8408c..f0cde90 100755 --- a/packaging/libtota.spec +++ b/packaging/libtota.spec @@ -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 diff --git a/ss_engine/SS_UPI.c b/ss_engine/SS_UPI.c index b0b854a..09596cb 100755 --- a/ss_engine/SS_UPI.c +++ b/ss_engine/SS_UPI.c @@ -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) {