diff options
Diffstat (limited to 'src/my-account-view-main.c')
-rw-r--r-- | src/my-account-view-main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/my-account-view-main.c b/src/my-account-view-main.c index 9ef2ddd..aa5f736 100644 --- a/src/my-account-view-main.c +++ b/src/my-account-view-main.c @@ -328,7 +328,8 @@ bool __myaccount_get_capablity_cb(const char* capability_type, account_capabilit MA_SNPRINTF(capability_textbuf, 127, "%s, %s", temp2, capability_string); MA_MEM_FREE(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'; } } } @@ -350,7 +351,7 @@ void myaccount_accountlist_set_service_name(myaccount_account_info* account_info MA_DEBUG("iter start"); if (!strcmp(account_app_info->package_name, account_info->package_name)) { MA_DEBUG("find same package_name"); - MA_STRNCPY(account_info->service_name, account_app_info->service_name, sizeof(account_info->service_name)); + MA_STRNCPY(account_info->service_name, account_app_info->service_name, sizeof(account_info->service_name)+1); break; } |