Change strcmp to strncmp 66/68666/1 accepted/tizen/common/20160511.141746 accepted/tizen/ivi/20160511.080244 accepted/tizen/ivi/20160511.080402 accepted/tizen/mobile/20160511.080153 accepted/tizen/mobile/20160511.080305 accepted/tizen/tv/20160511.080207 accepted/tizen/tv/20160511.080321 accepted/tizen/wearable/20160511.080224 accepted/tizen/wearable/20160511.080345 submit/tizen/20160510.074726 submit/tizen/20160510.075001
authorMinje Ahn <minje.ahn@samsung.com>
Mon, 9 May 2016 08:40:04 +0000 (17:40 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Mon, 9 May 2016 08:40:04 +0000 (17:40 +0900)
Change-Id: I60807ec81d87d8a090092dcd1e7cc4e0745c3eec
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/common/media-svc-media-folder.c

index 29f9753..458018a 100755 (executable)
@@ -41,8 +41,8 @@ static int __media_svc_is_root_path(const char *folder_path, bool *is_root, uid_
        char *internal_path = _media_svc_get_path(uid);
 
        if ((STRING_VALID(internal_path) && (strcmp(folder_path, internal_path) == 0)) ||
-               (STRING_VALID(MEDIA_ROOT_PATH_SDCARD) && strcmp(folder_path, MEDIA_ROOT_PATH_SDCARD) == 0) ||
-               (STRING_VALID(MEDIA_ROOT_PATH_CLOUD) && strcmp(folder_path, MEDIA_ROOT_PATH_CLOUD) == 0)) {
+               (STRING_VALID(MEDIA_ROOT_PATH_SDCARD) && strncmp(folder_path, MEDIA_ROOT_PATH_SDCARD, strlen(MEDIA_ROOT_PATH_SDCARD)) == 0) ||
+               (STRING_VALID(MEDIA_ROOT_PATH_CLOUD) && strncmp(folder_path, MEDIA_ROOT_PATH_CLOUD, strlen(MEDIA_ROOT_PATH_CLOUD)) == 0)) {
                media_svc_debug("ROOT PATH [%s]", folder_path);
                *is_root = TRUE;
        }