mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-22 02:30:56 +00:00
(Network/Relay Server Location) RetroArch crashed when pressing
left while Relay Server Location entry was selected - index offset would set itself to -1 and cause a buffer overflow
This commit is contained in:
parent
43000d2e24
commit
7173efe10f
@ -4615,8 +4615,9 @@ static int setting_string_action_left_netplay_mitm_server(
|
||||
if (!found)
|
||||
offset = list_len - 1;
|
||||
|
||||
strlcpy(setting->value.target.string,
|
||||
netplay_mitm_server_list[offset].name, setting->size);
|
||||
if (offset >= 0)
|
||||
strlcpy(setting->value.target.string,
|
||||
netplay_mitm_server_list[offset].name, setting->size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user