[TSEVEN-2228] Prevent stack-buffer overflow 17/283617/2 accepted/tizen/unified/20221123.015016
authorDewal Agarwal <d1.agarwal@samsung.com>
Mon, 31 Oct 2022 09:39:36 +0000 (15:09 +0530)
committerDewal Agarwal <d1.agarwal@samsung.com>
Mon, 31 Oct 2022 09:42:30 +0000 (15:12 +0530)
Change-Id: Ic4c9cc04ec57099f1fe8053bf54f5eeeb9e62dfb
Signed-off-by: Dewal Agarwal <d1.agarwal@samsung.com>
common/ctsvc_vcard.c
packaging/contacts-service.spec

index 12a13aa..443efa8 100644 (file)
@@ -2104,7 +2104,7 @@ EXPORT_API int contacts_vcard_make_from_my_profile(contacts_record_h record, cha
 #ifdef _CONTACTS_IPC_CLIENT
 static int __ctsvc_vcard_append_person(ctsvc_person_s *person, ctsvc_list_s *list_contacts, char **buf, int *buf_size, int len)
 {
-       int changed_time = 0;
+       time_t changed_time = 0;
        ctsvc_contact_s *contact;
        GList *cursor = NULL;
 
@@ -2214,7 +2214,7 @@ static int __ctsvc_vcard_append_person(ctsvc_person_s *person, ctsvc_list_s *lis
 
        if (changed_time) {
                struct tm ts;
-               gmtime_r((time_t*)&changed_time, &ts);
+               gmtime_r(&changed_time, &ts);
                char temp[VCARD_ITEM_LENGTH] = {0};
                snprintf(temp, sizeof(temp), "%s:%04d-%02d-%02dT%02d:%02d:%02dZ%s",
                                content_name[CTSVC_VCARD_VALUE_REV],
index 5d41788..e30e56a 100644 (file)
@@ -1,6 +1,6 @@
 Name:       contacts-service
 Summary:    Contacts Service
-Version:    0.13.77
+Version:    0.13.78
 Release:    0
 Group:      Social & Content/Service
 License:    Apache-2.0