mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Prevent bad PT_TEXTCMD/PT_TEXTCMD2 textcmd[0] sizes?
This commit is contained in:
parent
fdfd6e1c0b
commit
9e3bdc5ee2
1 changed files with 9 additions and 0 deletions
|
@ -3737,6 +3737,15 @@ FILESTAMP
|
||||||
tic_t tic = maketic;
|
tic_t tic = maketic;
|
||||||
UINT8 *textcmd;
|
UINT8 *textcmd;
|
||||||
|
|
||||||
|
// ignore if the textcmd size var is actually larger than it should be
|
||||||
|
if (BASEPACKETSIZE + netbuffer->u.textcmd[0] > (size_t)doomcom->datalength)
|
||||||
|
{
|
||||||
|
DEBFILE(va("GetPacket: Bad Textcmd packet size! (expected %d, actual %d)\n",
|
||||||
|
BASEPACKETSIZE + netbuffer->u.textcmd[0], doomcom->datalength));
|
||||||
|
Net_UnAcknowledgePacket(node);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// check if tic that we are making isn't too large else we cannot send it :(
|
// check if tic that we are making isn't too large else we cannot send it :(
|
||||||
// doomcom->numslots+1 "+1" since doomcom->numslots can change within this time and sent time
|
// doomcom->numslots+1 "+1" since doomcom->numslots can change within this time and sent time
|
||||||
j = software_MAXPACKETLENGTH
|
j = software_MAXPACKETLENGTH
|
||||||
|
|
Loading…
Reference in a new issue