mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
Fixed 2 remotely exploitable buffer overflow bugs.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2229 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
0cc2ba719c
commit
618aa941b7
1 changed files with 4 additions and 4 deletions
|
@ -1368,11 +1368,11 @@ void S_Play(void)
|
|||
{
|
||||
if (!Q_strrchr(Cmd_Argv(i), '.'))
|
||||
{
|
||||
Q_strcpy(name, Cmd_Argv(i));
|
||||
Q_strncpy(name, Cmd_Argv(i), sizeof(name)-4);
|
||||
Q_strcat(name, ".wav");
|
||||
}
|
||||
else
|
||||
Q_strcpy(name, Cmd_Argv(i));
|
||||
Q_strncpy(name, Cmd_Argv(i), sizeof(name));
|
||||
sfx = S_PrecacheSound(name);
|
||||
S_StartSound(cl.playernum[0]+1, -1, sfx, vec3_origin, 1.0, 0.0);
|
||||
// hash++;
|
||||
|
@ -1393,11 +1393,11 @@ void S_PlayVol(void)
|
|||
{
|
||||
if (!Q_strrchr(Cmd_Argv(i), '.'))
|
||||
{
|
||||
Q_strcpy(name, Cmd_Argv(i));
|
||||
Q_strncpy(name, Cmd_Argv(i), sizeof(name)-4);
|
||||
Q_strcat(name, ".wav");
|
||||
}
|
||||
else
|
||||
Q_strcpy(name, Cmd_Argv(i));
|
||||
Q_strncpy(name, Cmd_Argv(i), sizeof(name));
|
||||
sfx = S_PrecacheSound(name);
|
||||
vol = Q_atof(Cmd_Argv(i+1));
|
||||
S_StartSound(cl.playernum[0]+1, -1, sfx, vec3_origin, vol, 0.0);
|
||||
|
|
Loading…
Reference in a new issue