From: Hyunjee Kim Date: Mon, 23 Oct 2017 05:11:49 +0000 (+0900) Subject: Fix svace error X-Git-Tag: submit/tizen/20171116.055510^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd516d050dff8e7d7ba2721bc84c245b6fa10a32;p=platform%2Fcore%2Fapi%2Fbase-utils.git Fix svace error - Return value of a function 'icu::TimeZone::createDefault' is dereferenced at utils_i18n_timezone.cpp:205 without checking, Change-Id: Icdf36c2a13cb13b52b5cbc57d0250237f09909b5 Signed-off-by: Hyunjee Kim --- diff --git a/src/utils_i18n_timezone.cpp b/src/utils_i18n_timezone.cpp index 5e773ef..bec85fb 100755 --- a/src/utils_i18n_timezone.cpp +++ b/src/utils_i18n_timezone.cpp @@ -199,7 +199,10 @@ int i18n_timezone_create_default(i18n_timezone_h *timezone) { retv_if(timezone == NULL, I18N_ERROR_INVALID_PARAMETER); *timezone = TimeZone::createDefault(); + //Implement fallback mechanism to set the time zone to default time zone + if (*timezone == NULL) + return I18N_ERROR_INVALID_PARAMETER; char* zoneInfo = NULL; UnicodeString TimezoneID; ((TimeZone *) *timezone)->getID(TimezoneID);