mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-05 19:45:33 +03:00
Merge pull request #321 from WPMGPRoSToTeMa/FixSpectatorBufferOverflow
Allowed spectator and global unreliable buffer to overflow
This commit is contained in:
commit
e6fa6d7c07
@ -161,6 +161,7 @@ struct rehlds_server_t {
|
|||||||
// Extended net buffers
|
// Extended net buffers
|
||||||
uint8_t reliableDatagramBuffer[NET_MAX_PAYLOAD];
|
uint8_t reliableDatagramBuffer[NET_MAX_PAYLOAD];
|
||||||
uint8_t signonData[NET_MAX_PAYLOAD];
|
uint8_t signonData[NET_MAX_PAYLOAD];
|
||||||
|
uint8_t spectatorBuffer[MAX_DATAGRAM];
|
||||||
|
|
||||||
// Extended resource list
|
// Extended resource list
|
||||||
resource_t resources[RESOURCE_MAX_COUNT];
|
resource_t resources[RESOURCE_MAX_COUNT];
|
||||||
|
@ -6000,6 +6000,9 @@ int SV_SpawnServer(qboolean bIsDemo, char *server, char *startspot)
|
|||||||
g_psv.datagram.data = g_psv.datagram_buf;
|
g_psv.datagram.data = g_psv.datagram_buf;
|
||||||
g_psv.datagram.maxsize = sizeof(g_psv.datagram_buf);
|
g_psv.datagram.maxsize = sizeof(g_psv.datagram_buf);
|
||||||
g_psv.datagram.cursize = 0;
|
g_psv.datagram.cursize = 0;
|
||||||
|
#ifdef REHLDS_FIXES
|
||||||
|
g_psv.datagram.flags = SIZEBUF_ALLOW_OVERFLOW;
|
||||||
|
#endif
|
||||||
|
|
||||||
g_psv.reliable_datagram.buffername = "Server Reliable Datagram";
|
g_psv.reliable_datagram.buffername = "Server Reliable Datagram";
|
||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
@ -6012,8 +6015,14 @@ int SV_SpawnServer(qboolean bIsDemo, char *server, char *startspot)
|
|||||||
g_psv.reliable_datagram.cursize = 0;
|
g_psv.reliable_datagram.cursize = 0;
|
||||||
|
|
||||||
g_psv.spectator.buffername = "Server Spectator Buffer";
|
g_psv.spectator.buffername = "Server Spectator Buffer";
|
||||||
|
#ifdef REHLDS_FIXES
|
||||||
|
g_psv.spectator.data = g_rehlds_sv.spectatorBuffer;
|
||||||
|
g_psv.spectator.maxsize = sizeof(g_rehlds_sv.spectatorBuffer);
|
||||||
|
g_psv.spectator.flags = SIZEBUF_ALLOW_OVERFLOW;
|
||||||
|
#else
|
||||||
g_psv.spectator.data = g_psv.spectator_buf;
|
g_psv.spectator.data = g_psv.spectator_buf;
|
||||||
g_psv.spectator.maxsize = sizeof(g_psv.spectator_buf);
|
g_psv.spectator.maxsize = sizeof(g_psv.spectator_buf);
|
||||||
|
#endif
|
||||||
|
|
||||||
g_psv.multicast.buffername = "Server Multicast Buffer";
|
g_psv.multicast.buffername = "Server Multicast Buffer";
|
||||||
g_psv.multicast.data = g_psv.multicast_buf;
|
g_psv.multicast.data = g_psv.multicast_buf;
|
||||||
|
Loading…
Reference in New Issue
Block a user