Modified to check the string size is zero 02/229502/1
authorInHong Han <inhong1.han@samsung.com>
Wed, 1 Apr 2020 10:29:20 +0000 (19:29 +0900)
committerInHong Han <inhong1.han@samsung.com>
Wed, 1 Apr 2020 10:29:20 +0000 (19:29 +0900)
Change-Id: I2c49792905831954b08c307463cbfccebe88124e

client/sticker_data.c

index 555a23a..2a64633 100644 (file)
@@ -235,7 +235,7 @@ EXPORT_API int sticker_data_set_uri(sticker_data_h data_handle, sticker_data_uri
     CHECK_STICKER_FEATURE();
 
     char *file_path = NULL;
-    if (!data_handle || !type || !uri)
+    if (!data_handle || !type || !uri || uri[0] == '\0')
         return STICKER_ERROR_INVALID_PARAMETER;
 
     if (type == STICKER_DATA_URI_LOCAL_PATH) {
@@ -369,7 +369,7 @@ EXPORT_API int sticker_data_set_thumbnail(sticker_data_h data_handle, const char
     CHECK_STICKER_FEATURE();
 
     char *file_path = NULL;
-    if (!data_handle || !thumbnail)
+    if (!data_handle || !thumbnail || thumbnail[0] == '\0')
         return STICKER_ERROR_INVALID_PARAMETER;
 
     if (access(thumbnail, F_OK) != 0) {