From: JinWang An Date: Mon, 28 Dec 2020 01:57:56 +0000 (+0900) Subject: Initialize arrays to call i18n_ustring_copy_ua_n() X-Git-Tag: accepted/tizen/unified/20201229.124646^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cdc2571e265a3a114d40ecb7614132a3ae5e1b2b;p=platform%2Fcore%2Fapi%2Fbase-utils.git Initialize arrays to call i18n_ustring_copy_ua_n() Change-Id: Ie16688c0a2db33a2de96d1578890ef5445a46440 Signed-off-by: JinWang An --- diff --git a/i18ninfo/i18ninfo.cpp b/i18ninfo/i18ninfo.cpp index 72a6cac..4c25567 100644 --- a/i18ninfo/i18ninfo.cpp +++ b/i18ninfo/i18ninfo.cpp @@ -541,7 +541,7 @@ static int __get_date_and_time(char *input_time) ret = i18n_udatepg_create(default_locale, &udatepg); CHECK_ERROR("i18n_udatepg_create", ret); - i18n_uchar format[BUF_SIZE]; + i18n_uchar format[BUF_SIZE] = {0, }; i18n_ustring_copy_ua_n(format, "ddMMMyyyyHHmmssz", BUF_SIZE); /* To get default time zone id */ @@ -1291,7 +1291,7 @@ static int __convert_number(char *custom_number) free(number_to_convert); return 0; } - char p_string[BUF_SIZE]; + char p_string[BUF_SIZE] = {0, }; i18n_ustring_copy_au_n(p_string, str, BUF_SIZE); printf(" Convert number : %s\n", p_string); free(str);