diff --git a/frontend/drivers/platform_ps2.c b/frontend/drivers/platform_ps2.c index 2096bcaf43..a9cfe1e00e 100644 --- a/frontend/drivers/platform_ps2.c +++ b/frontend/drivers/platform_ps2.c @@ -44,10 +44,12 @@ static void create_path_names(void) { char user_path[FILENAME_MAX]; + /* TODO/FIXME - third parameter here needs to be size of + * rootDevicePath(bootDeviceID) */ strlcpy(user_path, rootDevicePath(bootDeviceID), rootDevicePath(bootDeviceID)); - strcat(user_path, "RETROARCH"); + strlcat(user_path, "RETROARCH", sizeof(user_path)); - // Content in the same folder + /* Content in the same folder */ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], cwd, "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], cwd, diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c index f92ddb236f..b57ce807d4 100644 --- a/menu/cbs/menu_cbs_left.c +++ b/menu/cbs/menu_cbs_left.c @@ -383,7 +383,8 @@ static int playlist_association_left(unsigned type, const char *label, bool wraparound) { char core_filename[PATH_MAX_LENGTH]; - size_t i, next, current = 0; + size_t i, current = 0; + size_t next = 0; playlist_t *playlist = playlist_get_cached(); const char *default_core_path = playlist_get_default_core_path(playlist); bool default_core_set = false; @@ -430,11 +431,8 @@ static int playlist_association_left(unsigned type, const char *label, /* ...then decrement it */ if (current == 0) - { /* Unset core association (DETECT) */ - next = 0; default_core_set = false; - } else next = current - 1; }