account_info->capablity_list = g_slist_append(account_info->capablity_list, (gpointer)cap_data);
if (capability_state == ACCOUNT_CAPABILITY_ENABLED) {
- capability_string = __myaccount_account_list_get_capablity_string_value(
- capability_type);
+ capability_string = __myaccount_account_list_get_capablity_string_value(capability_type);
if (capability_string != NULL) {
if (strlen(capability_textbuf) > 0) {
MA_SNPRINTF(capability_textbuf, 127, "%s, %s", temp2, capability_string);
MA_MEMFREE(temp2);
} else {
- MA_SNPRINTF(capability_textbuf, 127, "%s%s", capability_textbuf,
- capability_string);
+ if (strlen(capability_textbuf) < 128)
+ capability_textbuf[strlen(capability_textbuf) + 1] = '\0';
}
}
static Evas_Object *__myaccount_account_list_gl_icon_get(void *data,
Evas_Object *obj, const char *part)
{
- char tempbuf[PATH_MAX];
+ char tempbuf[PATH_MAX+1];
+ int icon_path_len = 0;
Evas_Object *icon = NULL;
myaccount_list_priv *account_info_item = (myaccount_list_priv*)data;
MYACCOUNT_ERROR("__myaccount_account_list_gl_icon_get: Data is NULL\n");
return NULL;
}
- memset(tempbuf, 0, sizeof(char)*PATH_MAX);
+ memset(tempbuf, 0, sizeof(char)*(PATH_MAX+1));
if (!strcmp(part, "elm.swallow.icon")) {
- if (strlen(account_info_item->icon_path) > 0) {
+ icon_path_len = strlen(account_info_item->icon_path);
+ if (icon_path_len > 0 && icon_path_len <= (PATH_MAX + 1)) {
MA_SNPRINTF(tempbuf, sizeof(tempbuf), "%s", account_info_item->icon_path);
} else {
MA_SNPRINTF(tempbuf, sizeof(tempbuf), "%s", "A01_2_Icon_default.png");
MYACCOUNT_ERROR("app_control_send_launch_request fail, ret = %d\n", ret);\r
}\r
\r
- MA_MEMFREE(username);\r
- MA_MEMFREE(package_name);\r
-\r
if (ret != APP_CONTROL_ERROR_NONE) {\r
MYACCOUNT_SLOGE("(%s) launch fail. ret(%x)\n", package_name, ret);\r
_myaccount_common_try_relaunch(ad, app_control);\r
+ MA_MEMFREE(username);\r
+ MA_MEMFREE(package_name);\r
return 0;\r
}\r
\r
+ MA_MEMFREE(username);\r
+ MA_MEMFREE(package_name);\r
+\r
app_control_destroy(app_control);\r
_myaccount_common_launch_timer_start(ad);\r
\r
\r
if (type_int == FALSE\r
&& account_query_account_by_package_name(myaccount_common_account_by_package_name_cb, type_buf, NULL) == ACCOUNT_ERROR_NONE) {\r
- MYACCOUNT_SLOGD("Multiple account not support (%s)\n", type_buf);\r
+ if (type_buf != NULL)\r
+ MYACCOUNT_SLOGD("Multiple account not support (%s)\n", type_buf);\r
MA_MEMFREE(type_buf);\r
return TRUE;\r
}\r