prevent netvar string overflow

This commit is contained in:
Alug committed 2024-09-16 11:03:03 +02:00
1 parent 9b6995e267
commit 16ea4c1393
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -1632,8 +1632,9 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
if (var->flags & CV_NETVAR)
{
// send the value of the variable
UINT8 buf[128];
UINT8 buf[512];
UINT8 *p = buf;
if (!(server || (IsPlayerAdmin(consoleplayer))))
{
CONS_Printf(M_GetText("Only the server or admin can change: %s %s\n"), var->name, var->string);
+1 -1
View File
@@ -3369,7 +3369,7 @@ FUNCINLINE static ATTRINLINE boolean P_NetUnArchiveMisc(boolean reloading)
// gamemap changed; we assume that its map header is always valid,
// so make it so
if(!mapheaderinfo[gamemap-1])
if (!mapheaderinfo[gamemap-1])
P_AllocMapHeader(gamemap-1);
// tell the sound code to reset the music since we're skipping what