fix a few more possible overruns
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2285 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
60d22a4d20
commit
3a8ae069c4
4 changed files with 9 additions and 9 deletions
|
@ -1021,7 +1021,7 @@ void MasterInfo_ProcessHTTP(char *name, qboolean success, int type)
|
|||
info->special = type;
|
||||
info->refreshtime = 0;
|
||||
|
||||
sprintf(info->name, "%s", NET_AdrToString(info->adr));
|
||||
snprintf(info->name, sizeof(info->name), "%s", NET_AdrToString(info->adr));
|
||||
|
||||
info->next = firstserver;
|
||||
firstserver = info;
|
||||
|
@ -1487,7 +1487,7 @@ int CL_ReadServerInfo(char *msg, int servertype, qboolean favorite)
|
|||
|
||||
info->adr = net_from;
|
||||
|
||||
sprintf(info->name, "%s", NET_AdrToString(info->adr));
|
||||
snprintf(info->name, sizeof(info->name), "%s", NET_AdrToString(info->adr));
|
||||
|
||||
info->next = firstserver;
|
||||
firstserver = info;
|
||||
|
@ -1723,7 +1723,7 @@ void CL_MasterListParse(int type, qboolean slashpad)
|
|||
info->special = type;
|
||||
info->refreshtime = 0;
|
||||
|
||||
sprintf(info->name, "%s", NET_AdrToString(info->adr));
|
||||
snprintf(info->name, sizeof(info->name), "%s", NET_AdrToString(info->adr));
|
||||
|
||||
info->next = last;
|
||||
last = info;
|
||||
|
|
|
@ -505,7 +505,7 @@ void SV_Map_f (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
sprintf (expanded, "maps/%s.bsp", level);
|
||||
snprintf (expanded, sizeof(expanded), "maps/%s.bsp", level);
|
||||
if (!COM_FCheckExists (expanded))
|
||||
{
|
||||
//doesn't exist, so try lowercase. Q3 does this.
|
||||
|
@ -514,7 +514,7 @@ void SV_Map_f (void)
|
|||
if (level[i] >= 'A' && level[i] <= 'Z')
|
||||
level[i] = level[i] - 'A' + 'a';
|
||||
}
|
||||
sprintf (expanded, "maps/%s.bsp", level);
|
||||
snprintf (expanded, sizeof(expanded), "maps/%s.bsp", level);
|
||||
if (!COM_FCheckExists (expanded))
|
||||
{
|
||||
Con_TPrintf (STL_CANTFINDMAP, expanded);
|
||||
|
@ -1389,7 +1389,7 @@ void SV_Floodprotmsg_f (void)
|
|||
Con_TPrintf(STL_FLOODPROTMESSAGESYNTAX);
|
||||
return;
|
||||
}
|
||||
sprintf(fp_msg, "%s", Cmd_Argv(1));
|
||||
snprintf(fp_msg, sizeof(fp_msg), "%s", Cmd_Argv(1));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1165,9 +1165,9 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us
|
|||
if (val)
|
||||
{
|
||||
if (progstype == PROG_H2)
|
||||
Q_snprintfz(sv.mapname, sizeof(sv.mapname), "%s", T_GetString(val->_float-1));
|
||||
snprintf(sv.mapname, sizeof(sv.mapname), "%s", T_GetString(val->_float-1));
|
||||
else
|
||||
Q_snprintfz(sv.mapname, sizeof(sv.mapname), "%s", PR_GetString(svprogfuncs, val->string));
|
||||
snprintf(sv.mapname, sizeof(sv.mapname), "%s", PR_GetString(svprogfuncs, val->string));
|
||||
}
|
||||
if (Cvar_Get("sv_readonlyworld", "1", 0, "DP compatability")->value)
|
||||
ent->readonly = true; //lock it down!
|
||||
|
|
|
@ -2526,7 +2526,7 @@ void SV_WriteIP_f (void)
|
|||
int i;
|
||||
char *s;
|
||||
|
||||
sprintf (name, "listip.cfg");
|
||||
strcpy (name, "listip.cfg");
|
||||
|
||||
Con_Printf ("Writing %s.\n", name);
|
||||
|
||||
|
|
Loading…
Reference in a new issue