Reduce some char arrays which are too big

This commit is contained in:
libretroadmin 2023-06-19 17:31:50 +02:00
parent 6015e73003
commit 0bf3d21538
5 changed files with 7 additions and 9 deletions

View File

@ -1374,22 +1374,20 @@ static void build_ticker_loop_string(
/* Copy chunk of spacer string, if required */
if (num_chars2 > 0)
{
char tmp[PATH_MAX_LENGTH];
char tmp[32];
utf8cpy(
tmp, sizeof(tmp),
utf8skip(spacer, char_offset2), num_chars2);
strlcat(dest_str, tmp, dest_str_len);
}
/* Copy 'leading' chunk of source string, if required */
if (num_chars3 > 0)
{
char tmp[PATH_MAX_LENGTH];
char tmp[80];
utf8cpy(
tmp, sizeof(tmp),
utf8skip(src_str, char_offset3), num_chars3);
strlcat(dest_str, tmp, dest_str_len);
}
}

View File

@ -703,7 +703,7 @@ void video_driver_force_fallback(const char *driver)
if (msg_window)
{
char text[PATH_MAX_LENGTH];
char text[128];
ui_msg_window_state window_state;
char *title = strdup(msg_hash_to_str(MSG_ERROR));

View File

@ -420,7 +420,7 @@ rarch_softfilter_t *rarch_softfilter_new(const char *filter_config,
softfilter_simd_mask_t cpu_features = (softfilter_simd_mask_t)cpu_features_get();
#ifdef HAVE_DYLIB
char basedir[PATH_MAX_LENGTH];
char ext_name[PATH_MAX_LENGTH];
char ext_name[8];
#endif
struct string_list *plugs = NULL;
rarch_softfilter_t *filt = (rarch_softfilter_t*)

View File

@ -75,7 +75,7 @@ task_finished:
/* If finished successfully */
if (MIST_IS_SUCCESS(result))
{
char msg[PATH_MAX_LENGTH];
char msg[128];
size_t _len = strlcpy(msg, msg_hash_to_str(MSG_CORE_INSTALLED),
sizeof(msg));
strlcpy(msg + _len,
@ -99,7 +99,7 @@ void task_push_steam_core_dlc_install(
const char *name)
{
size_t _len;
char task_title[PATH_MAX_LENGTH];
char task_title[128];
retro_task_t *task = task_init();
steam_core_dlc_install_state_t* state = (steam_core_dlc_install_state_t*)calloc(1,

View File

@ -5095,8 +5095,8 @@ void LoadCoreWindow::onLoadCustomCoreClicked()
size_t _len;
QString path;
QByteArray pathArray;
char filters[128];
char core_ext[255] = {0};
char filters[PATH_MAX_LENGTH] = {0};
const char *pathData = NULL;
settings_t *settings = config_get_ptr();
const char *path_dir_libretro = settings->paths.directory_libretro;