mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 12:32:09 +00:00
Don't read clc.voipIncomingSequence until range checked sender
This commit is contained in:
parent
581b6316b7
commit
ebac005c9e
1 changed files with 3 additions and 1 deletions
|
@ -709,7 +709,7 @@ void CL_ParseVoip ( msg_t *msg ) {
|
|||
const int packetsize = MSG_ReadShort(msg);
|
||||
const int flags = MSG_ReadBits(msg, VOIP_FLAGCNT);
|
||||
char encoded[1024];
|
||||
int seqdiff = sequence - clc.voipIncomingSequence[sender];
|
||||
int seqdiff;
|
||||
int written = 0;
|
||||
int i;
|
||||
|
||||
|
@ -753,6 +753,8 @@ void CL_ParseVoip ( msg_t *msg ) {
|
|||
|
||||
Com_DPrintf("VoIP: packet accepted!\n");
|
||||
|
||||
seqdiff = sequence - clc.voipIncomingSequence[sender];
|
||||
|
||||
// This is a new "generation" ... a new recording started, reset the bits.
|
||||
if (generation != clc.voipIncomingGeneration[sender]) {
|
||||
Com_DPrintf("VoIP: new generation %d!\n", generation);
|
||||
|
|
Loading…
Reference in a new issue