mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
Fix pointer overflow
This commit is contained in:
parent
2f39e4cd33
commit
66f056322a
@ -930,7 +930,7 @@ static void xmb_update_thumbnail_path(void *data, unsigned i)
|
|||||||
playlist_get_index(playlist, i,
|
playlist_get_index(playlist, i,
|
||||||
NULL, NULL, NULL, &core_name, NULL, NULL);
|
NULL, NULL, NULL, &core_name, NULL, NULL);
|
||||||
|
|
||||||
if (core_name && string_is_equal_fast(core_name, "imageviewer", 11))
|
if (string_is_equal(core_name, "imageviewer"))
|
||||||
{
|
{
|
||||||
strlcpy(xmb->thumbnail_file_path, entry.label,
|
strlcpy(xmb->thumbnail_file_path, entry.label,
|
||||||
sizeof(xmb->thumbnail_file_path));
|
sizeof(xmb->thumbnail_file_path));
|
||||||
|
@ -2198,10 +2198,14 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
|||||||
break;
|
break;
|
||||||
case MENU_NAVIGATION_CTL_ADD_SCROLL_INDEX:
|
case MENU_NAVIGATION_CTL_ADD_SCROLL_INDEX:
|
||||||
{
|
{
|
||||||
size_t *sel = (size_t*)data;
|
size_t *sel = (size_t*)data;
|
||||||
if (!sel)
|
if (!sel)
|
||||||
return false;
|
return false;
|
||||||
scroll_index_list[scroll_index_size++] = *sel;
|
|
||||||
|
if ((scroll_index_size + 1) >= SCROLL_INDEX_SIZE)
|
||||||
|
scroll_index_list[scroll_index_size] = *sel;
|
||||||
|
else
|
||||||
|
scroll_index_list[scroll_index_size++] = *sel;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MENU_NAVIGATION_CTL_GET_SCROLL_ACCEL:
|
case MENU_NAVIGATION_CTL_GET_SCROLL_ACCEL:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user