for (i=0 ; i<MAX_SAVEGAMES ; i++)
{
- strcpy (m_filenames[i], "--- UNUSED SLOT ---");
+ strlcpy (m_filenames[i], "--- UNUSED SLOT ---", sizeof(m_filenames[i]));
loadable[i] = false;
sprintf (name, "s%i.sav", (int)i);
f = FS_Open (name, "rb", false, false);
key_dest = key_menu;
m_state = m_setup;
m_entersound = true;
- strcpy(setup_myname, cl_name.string);
+ strlcpy(setup_myname, cl_name.string, sizeof(setup_myname));
setup_top = setup_oldtop = cl_color.integer >> 4;
setup_bottom = setup_oldbottom = cl_color.integer & 15;
setup_rate = cl_rate.integer;
// LordHavoc: redesigned to print more than 2 keys, inspired by Tomaz's MiniRacer
if (keys[0] == -1)
- strcpy(keystring, "???");
+ strlcpy(keystring, "???", sizeof(keystring));
else
{
keystring[0] = 0;
if (keys[j] != -1)
{
if (j > 0)
- strcat(keystring, " or ");
- strcat(keystring, Key_KeynumToString (keys[j]));
+ strlcat(keystring, " or ", sizeof(keystring));
+ strlcat(keystring, Key_KeynumToString (keys[j]), sizeof(keystring));
}
}
}