mirror of
https://github.com/libretro/RetroArch
synced 2025-04-25 09:02:44 +00:00
Merge pull request #3126 from nikola-kocic/fix-snprintf-overlap
Fix overlap of source and destination buffers in snprintf call
This commit is contained in:
commit
d0697236f0
@ -1586,7 +1586,7 @@ static void command_event_save_state(const char *path,
|
|||||||
strlcpy(buf, path, sizeof(buf));
|
strlcpy(buf, path, sizeof(buf));
|
||||||
snprintf(buf, sizeof(buf), "%s", path);
|
snprintf(buf, sizeof(buf), "%s", path);
|
||||||
path_remove_extension(buf);
|
path_remove_extension(buf);
|
||||||
snprintf(buf, sizeof(buf), "%s.last", buf);
|
strlcat(buf, ".last", sizeof(buf));
|
||||||
|
|
||||||
if (!content_rename_state(path, buf))
|
if (!content_rename_state(path, buf))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user