summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/sv_client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/sv_client.c b/src/server/sv_client.c
index 126a9d05..f3a0494f 100644
--- a/src/server/sv_client.c
+++ b/src/server/sv_client.c
@@ -1565,7 +1565,7 @@ void SV_UserVoip(client_t *cl, msg_t *msg, qboolean ignoreData)
}
packetsize = MSG_ReadShort(msg);
- if (msg->readcount > msg->cursize)
+ if (msg->readcount + packetsize > msg->cursize)
return; // short/invalid packet, bail.
if (packetsize > sizeof (encoded)) { // overlarge packet?