mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
Don't use strcpy
This commit is contained in:
parent
d411bfa5de
commit
946de514dc
@ -193,9 +193,9 @@ static bool command_read_ram(const char *arg)
|
||||
char reply[256];
|
||||
char *reply_at = NULL;
|
||||
|
||||
strcpy(reply, "READ_CORE_RAM ");
|
||||
strlcpy(reply, "READ_CORE_RAM ", sizeof(reply));
|
||||
reply_at = reply + strlen("READ_CORE_RAM ");
|
||||
strcpy(reply_at, arg);
|
||||
strlcpy(reply_at, arg, sizeof(reply_at));
|
||||
|
||||
cheevos_parse_guest_addr(&var, strtoul(reply_at, (char**)&reply_at, 16));
|
||||
data = cheevos_get_memory(&var);
|
||||
@ -213,7 +213,7 @@ static bool command_read_ram(const char *arg)
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(reply_at, " -1\n");
|
||||
strlcpy(reply_at, " -1\n", sizeof(reply_at));
|
||||
command_reply(reply, reply_at+strlen(" -1\n") - reply);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user