Prevent issue fix 24/49624/2 accepted/tizen/mobile/20151016.044024 accepted/tizen/tv/20151016.044037 accepted/tizen/wearable/20151016.044052 submit/tizen/20151016.024457
authorHaejeong, Kim <backto.kim@samsung.com>
Fri, 16 Oct 2015 01:56:41 +0000 (10:56 +0900)
committerHaejeong, Kim <backto.kim@samsung.com>
Fri, 16 Oct 2015 02:00:53 +0000 (11:00 +0900)
Change-Id: I4bbe170ab7b8c0faabf517b9deda6dd947e93f2e

packaging/capi-content-media-content.spec
src/media_content.c
src/media_util_private.c

index 559af26..dbe3fd4 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-content-media-content
 Summary:    A Media content library in SLP C API
-Version:    0.2.69
+Version:    0.2.70
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index ea518af..9bd3041 100755 (executable)
@@ -588,7 +588,7 @@ int __media_content_cynara_check(const char *privilege)
                return MEDIA_CONTENT_ERROR_INVALID_OPERATION;
        }
 
-       sprintf(c_uid, "%d", tzplatform_getuid(TZ_USER_NAME));
+       snprintf(c_uid, sizeof(c_uid), "%d", tzplatform_getuid(TZ_USER_NAME));
 
        pid = getpid();
 
index 4bd9d82..37cea49 100755 (executable)
@@ -138,7 +138,7 @@ int _media_util_check_ignore_dir(const char *dir_path, bool *ignore)
                else
                {
                        /*If root path, Stop Scanning*/
-                       if((storage_type == MEDIA_SVC_STORAGE_INTERNAL) && (strcmp(search_path, MEDIA_ROOT_PATH_INTERNAL) == 0)) {
+                       if((storage_type == MEDIA_SVC_STORAGE_INTERNAL) && (STRING_VALID(MEDIA_ROOT_PATH_INTERNAL) && strcmp(search_path, MEDIA_ROOT_PATH_INTERNAL) == 0)) {
                                break;
                        } else if((storage_type == MEDIA_SVC_STORAGE_EXTERNAL) && (STRING_VALID(MEDIA_ROOT_PATH_SDCARD)) && (strcmp(search_path, MEDIA_ROOT_PATH_SDCARD) == 0)) {
                                break;