[contacts-service][Non-ACR][SATIZENVUL-1375 privilege escalation] 49/184949/1
authorSameer Prakash Pradhan <sp.pradhan@samsung.com>
Tue, 24 Jul 2018 12:01:45 +0000 (17:31 +0530)
committerSameer Prakash Pradhan <sp.pradhan@samsung.com>
Tue, 24 Jul 2018 12:01:45 +0000 (17:31 +0530)
Change-Id: I0ddb64995f577594b506ec95a40302078afa953a
Signed-off-by: Sameer Prakash Pradhan <sp.pradhan@samsung.com>
common/ctsvc_vcard.c
server/db/ctsvc_db_utils.c

index 0a7faa8..478a275 100644 (file)
@@ -532,9 +532,10 @@ static inline const char* __ctsvc_get_img_suffix(int type)
        case CTSVC_VCARD_IMG_AVI:
                return "avi";
        case CTSVC_VCARD_IMG_JPEG:
-       case CTSVC_VCARD_IMG_NONE:
-       default:
                return "jpeg";
+       default:
+               ERR("Wrong Image type is: CTSVC_VCARD_IMG_NONE");
+               return NULL;
        }
 }
 
index ec47b21..087108d 100644 (file)
@@ -549,6 +549,7 @@ int ctsvc_utils_copy_image(const char *dir, const char *src, const char *file)
        ret = _ctsvc_image_encode(src, dest, CTSVC_IMAGE_MAX_SIZE);
        if (CONTACTS_ERROR_NONE == ret)
                return ret;
+#if 0
        else
                /* LCOV_EXCL_START */
                ERR("_ctsvc_image_encode Fail(%d)", ret);
@@ -600,7 +601,7 @@ int ctsvc_utils_copy_image(const char *dir, const char *src, const char *file)
 
        close(src_fd);
        close(dest_fd);
-
+#endif
        return CONTACTS_ERROR_NONE;
 }