sv_user.c: check if prydon cursor entnum is in range
This commit is contained in:
parent
2efeab6a4c
commit
01a78ca2d1
1 changed files with 4 additions and 0 deletions
|
@ -8051,6 +8051,10 @@ static void SV_ReadPrydonCursor(usercmd_t *cmd)
|
||||||
cmd->cursor_impact[2] = MSG_ReadFloat();
|
cmd->cursor_impact[2] = MSG_ReadFloat();
|
||||||
cmd->cursor_entitynumber = MSGSV_ReadEntity(host_client);
|
cmd->cursor_entitynumber = MSGSV_ReadEntity(host_client);
|
||||||
|
|
||||||
|
/* client is sending junk or trying to crash us -eukara */
|
||||||
|
if (cmd->cursor_entitynumber < 0 || cmd->cursor_entitynumber >= sv.world.num_edicts) {
|
||||||
|
cmd->cursor_entitynumber = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (svprogfuncs)
|
if (svprogfuncs)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue