mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-10 09:41:09 +00:00
Fix possible networked out-of-bounds access.
This commit is contained in:
parent
f117e246b4
commit
b1c679f772
1 changed files with 5 additions and 1 deletions
|
@ -1430,7 +1430,7 @@ static void CL_ParseUpdate (int bits)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
qmodel_t *model;
|
qmodel_t *model;
|
||||||
int modnum;
|
unsigned int modnum;
|
||||||
qboolean forcelink;
|
qboolean forcelink;
|
||||||
entity_t *ent;
|
entity_t *ent;
|
||||||
int num;
|
int num;
|
||||||
|
@ -1575,7 +1575,11 @@ static void CL_ParseUpdate (int bits)
|
||||||
if (bits & U_FRAME2)
|
if (bits & U_FRAME2)
|
||||||
ent->frame = (ent->frame & 0x00FF) | (MSG_ReadByte() << 8);
|
ent->frame = (ent->frame & 0x00FF) | (MSG_ReadByte() << 8);
|
||||||
if (bits & U_MODEL2)
|
if (bits & U_MODEL2)
|
||||||
|
{
|
||||||
modnum = (modnum & 0x00FF) | (MSG_ReadByte() << 8);
|
modnum = (modnum & 0x00FF) | (MSG_ReadByte() << 8);
|
||||||
|
if (modnum >= MAX_MODELS)
|
||||||
|
Host_Error ("CL_ParseModel: bad modnum");
|
||||||
|
}
|
||||||
if (bits & U_LERPFINISH)
|
if (bits & U_LERPFINISH)
|
||||||
{
|
{
|
||||||
ent->lerpfinish = ent->msgtime + ((float)(MSG_ReadByte()) / 255);
|
ent->lerpfinish = ent->msgtime + ((float)(MSG_ReadByte()) / 255);
|
||||||
|
|
Loading…
Reference in a new issue