replace some strlcats with strlcpy

This commit is contained in:
libretroadmin 2023-07-15 15:37:26 +02:00
parent e1af98cc43
commit 9fc1229bb1
2 changed files with 6 additions and 5 deletions

View File

@ -467,8 +467,8 @@ static int action_get_core_information_list(
/* Check whether we are parsing information for a
* core updater/manager entry or the currently loaded core */
if ((menu_type == FILE_TYPE_DOWNLOAD_CORE) ||
(menu_type == MENU_SETTING_ACTION_CORE_MANAGER_OPTIONS))
if ( (menu_type == FILE_TYPE_DOWNLOAD_CORE)
|| (menu_type == MENU_SETTING_ACTION_CORE_MANAGER_OPTIONS))
{
core_info_t *core_info_menu = NULL;

View File

@ -138,13 +138,14 @@ static void contentless_cores_init_info_entries(
tmp_str[0] = '\0';
string_list_join_concat(tmp_str, sizeof(tmp_str),
core_info->licenses_list, ", ");
strlcat(licenses_str, tmp_str, sizeof(licenses_str));
strlcpy(licenses_str + _len, tmp_str,
sizeof(licenses_str) - _len);
}
/* No license found - set to N/A */
else
strlcat(licenses_str,
strlcpy(licenses_str + _len,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
sizeof(licenses_str));
sizeof(licenses_str) - _len);
entry->licenses_str = strdup(licenses_str);