Add null checker 74/175174/2
authorMinje Ahn <minje.ahn@samsung.com>
Mon, 9 Apr 2018 07:12:38 +0000 (16:12 +0900)
committerhj kim <backto.kim@samsung.com>
Mon, 9 Apr 2018 08:28:44 +0000 (08:28 +0000)
Change-Id: I2e83eabd11a3ec398ac8538f30655945d53426b5
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
lib/media-util-user.c

index f238454..174dae4 100755 (executable)
@@ -65,6 +65,7 @@ static int __ms_user_get_path(ms_user_path_type_e type, const char *storage_id,
 
        idx = uid - 5000;
        MSAPI_RETVM_IF(idx < 0 || idx > 127, MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid uid");
+       MSAPI_RETVM_IF(type == THUMB_EXTERNAL && storage_id == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
 
        g_mutex_lock(&tzplatform_mutex);