mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-28 23:02:31 +00:00
Security fixes (hope it works)
This commit is contained in:
parent
28701e8f76
commit
62d76003eb
1 changed files with 12 additions and 2 deletions
|
@ -169,7 +169,7 @@ SV_Soundlist_f
|
|||
void SV_Soundlist_f (void)
|
||||
{
|
||||
char **s;
|
||||
int n;
|
||||
unsigned n;
|
||||
|
||||
if (host_client->state != cs_connected)
|
||||
{
|
||||
|
@ -186,6 +186,11 @@ void SV_Soundlist_f (void)
|
|||
}
|
||||
|
||||
n = atoi(Cmd_Argv(2));
|
||||
if (n >= MAX_SOUNDS) {
|
||||
Con_Printf ("SV_Soundlist_f: Invalid soundlist index\n");
|
||||
SV_New_f ();
|
||||
return;
|
||||
}
|
||||
|
||||
//NOTE: This doesn't go through ClientReliableWrite since it's before the user
|
||||
//spawns. These functions are written to not overflow
|
||||
|
@ -219,7 +224,7 @@ SV_Modellist_f
|
|||
void SV_Modellist_f (void)
|
||||
{
|
||||
char **s;
|
||||
int n;
|
||||
unsigned n;
|
||||
|
||||
if (host_client->state != cs_connected)
|
||||
{
|
||||
|
@ -236,6 +241,11 @@ void SV_Modellist_f (void)
|
|||
}
|
||||
|
||||
n = atoi(Cmd_Argv(2));
|
||||
if (n >= MAX_MODELS) {
|
||||
Con_Printf ("SV_Modellist_f: Invalid modellist index\n");
|
||||
SV_New_f ();
|
||||
return;
|
||||
}
|
||||
|
||||
//NOTE: This doesn't go through ClientReliableWrite since it's before the user
|
||||
//spawns. These functions are written to not overflow
|
||||
|
|
Loading…
Reference in a new issue