Don't read clc.voipIncomingSequence until range checked sender
This commit is contained in:
1 parent
581b6316b7
commit
ebac005c9e
1 file changed
+3
-1
@@ -709,7 +709,7 @@ void CL_ParseVoip ( msg_t *msg ) {
|
|||||||
const int packetsize = MSG_ReadShort(msg);
|
const int packetsize = MSG_ReadShort(msg);
|
||||||
const int flags = MSG_ReadBits(msg, VOIP_FLAGCNT);
|
const int flags = MSG_ReadBits(msg, VOIP_FLAGCNT);
|
||||||
char encoded[1024];
|
char encoded[1024];
|
||||||
int seqdiff = sequence - clc.voipIncomingSequence[sender];
|
int seqdiff;
|
||||||
int written = 0;
|
int written = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -753,6 +753,8 @@ void CL_ParseVoip ( msg_t *msg ) {
|
|||||||
|
|
||||||
Com_DPrintf("VoIP: packet accepted!\n");
|
Com_DPrintf("VoIP: packet accepted!\n");
|
||||||
|
|
||||||
|
seqdiff = sequence - clc.voipIncomingSequence[sender];
|
||||||
|
|
||||||
// This is a new "generation" ... a new recording started, reset the bits.
|
// This is a new "generation" ... a new recording started, reset the bits.
|
||||||
if (generation != clc.voipIncomingGeneration[sender]) {
|
if (generation != clc.voipIncomingGeneration[sender]) {
|
||||||
Com_DPrintf("VoIP: new generation %d!\n", generation);
|
Com_DPrintf("VoIP: new generation %d!\n", generation);
|
||||||
|
|||||||
Reference in new issue
Block a user