mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
try to dump the packet resulting in an overflow
This commit is contained in:
parent
940598f240
commit
889b9ce740
2 changed files with 16 additions and 2 deletions
|
@ -168,7 +168,7 @@ char *clc_string[] = {
|
|||
#define svc_particle 18 // [vec3] <variable>
|
||||
#define svc_signonnum 25 // [byte] used for the signon
|
||||
// sequence
|
||||
|
||||
static VFile _stdout;
|
||||
static VFile *Net_PacketLog;
|
||||
static char **Net_sound_precache;
|
||||
static sizebuf_t _packet;
|
||||
|
@ -397,10 +397,16 @@ Log_Delta(int bits)
|
|||
void
|
||||
Analyze_Server_Packet (byte * data, int len)
|
||||
{
|
||||
if (!Net_PacketLog) {
|
||||
_stdout.file = stdout;
|
||||
Net_PacketLog = &_stdout;
|
||||
}
|
||||
packet.message->data = data;
|
||||
packet.message->cursize = len;
|
||||
MSG_BeginReading (&packet);
|
||||
Parse_Server_Packet ();
|
||||
if (Net_PacketLog == &_stdout)
|
||||
Net_PacketLog = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -850,11 +856,16 @@ Parse_Server_Packet ()
|
|||
void
|
||||
Analyze_Client_Packet (byte * data, int len)
|
||||
{
|
||||
// FIXME: quick-hack
|
||||
if (!Net_PacketLog) {
|
||||
_stdout.file = stdout;
|
||||
Net_PacketLog = &_stdout;
|
||||
}
|
||||
packet.message->data = data;
|
||||
packet.message->cursize = len;
|
||||
MSG_BeginReading (&packet);
|
||||
Parse_Client_Packet ();
|
||||
if (Net_PacketLog == &_stdout)
|
||||
Net_PacketLog = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -765,6 +765,9 @@ SV_SendClientMessages (void)
|
|||
// if the reliable message overflowed,
|
||||
// drop the client
|
||||
if (c->netchan.message.overflowed) {
|
||||
extern void Analyze_Server_Packet (byte *data, int len);
|
||||
|
||||
Analyze_Server_Packet (c->netchan.message.data, c->netchan.message.cursize);
|
||||
SZ_Clear (&c->netchan.message);
|
||||
SZ_Clear (&c->datagram);
|
||||
SV_BroadcastPrintf (PRINT_HIGH, "%s overflowed\n", c->name);
|
||||
|
|
Loading…
Reference in a new issue