From: Jongkyu Koo Date: Mon, 7 Mar 2016 23:10:09 +0000 (+0900) Subject: fix a svace issue X-Git-Tag: accepted/tizen/common/20160311.201921^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f28dc7706210d8c0f2d45e6a200a7ee31f9ffbe;p=platform%2Fcore%2Fpim%2Fcontacts-service.git fix a svace issue Change-Id: Ibe579e21d2a6d84cca454cbf6a768ad3b4dbb99a Signed-off-by: Jongkyu Koo --- diff --git a/common/ctsvc_vcard.c b/common/ctsvc_vcard.c index d631692..6a13a63 100644 --- a/common/ctsvc_vcard.c +++ b/common/ctsvc_vcard.c @@ -2560,12 +2560,13 @@ static inline int __ctsvc_vcard_get_nickname(ctsvc_list_s *nickname_list, char * int ret = CONTACTS_ERROR_NONE; char *temp; char *start; + char *last; const char *separator = ","; start = __ctsvc_get_content_value(val); RETV_IF(NULL == start, CONTACTS_ERROR_NO_DATA); - temp = strtok(start, separator); + temp = strtok_r(start, separator, &last); while (temp) { if ('\0' == *temp) continue; @@ -2585,7 +2586,7 @@ static inline int __ctsvc_vcard_get_nickname(ctsvc_list_s *nickname_list, char * contacts_record_set_str(nickname, _contacts_nickname.name, __ctsvc_vcard_remove_escape_char(start)); contacts_list_add((contacts_list_h)nickname_list, nickname); - temp = strtok(NULL, separator); + temp = strtok_r(NULL, separator, &last); } return CONTACTS_ERROR_NONE;