fix a svace issue 20/61420/1 accepted/tizen_tv accepted/tizen/common/20160311.201939 accepted/tizen/ivi/20160311.145859 accepted/tizen/mobile/20160311.142806 accepted/tizen/tv/20160311.144441 accepted/tizen/wearable/20160311.145214 submit/tizen/20160311.051903
authorJongkyu Koo <jk.koo@samsung.com>
Mon, 7 Mar 2016 23:11:08 +0000 (08:11 +0900)
committerJongkyu Koo <jk.koo@samsung.com>
Mon, 7 Mar 2016 23:11:08 +0000 (08:11 +0900)
Change-Id: I983d45a8a9f9d7d29061a5888fd052f0f3d3eb80
Signed-off-by: Jongkyu Koo <jk.koo@samsung.com>
daemon/phnd-region-data.c

index 7098f7f5a57476ab05050b89654c11610796e44a..68229383b090c9e57a4448c1371f2ae0604e34dd 100644 (file)
@@ -427,9 +427,10 @@ int phn_region_data_get_lang_str(phone_number_lang_e lang, char **lang_str)
 
        if (PHONE_NUMBER_LANG_SYSTEM == lang) {
                char *str = NULL;
+               char *last;
                ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &str);
                if (str)
-                       *lang_str = g_strdup(strtok(str, "_"));
+                       *lang_str = g_strdup(strtok_r(str, "_", &last));
                free(str);
                if (SYSTEM_SETTINGS_ERROR_NONE != ret) {
                        ERR("system_settings_get_value_string() Fail(%d)", ret);