mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Fix buffer overflow when setting a NETVAR string CVar
There was a possible buffer overflow if you tried setting a console var that had the CV_NETVAR and that was of the string type. The overflow would happen if you were trying to set the console variable while in a multiplayer / netgame state. This commit just increases the size of buf to account for everything that needs to be written to it.
This commit is contained in:
parent
c2b57e2654
commit
68264e7288
1 changed files with 1 additions and 1 deletions
|
@ -1992,7 +1992,7 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
|
||||||
if (var->flags & CV_NETVAR)
|
if (var->flags & CV_NETVAR)
|
||||||
{
|
{
|
||||||
// send the value of the variable
|
// send the value of the variable
|
||||||
UINT8 buf[128];
|
UINT8 buf[512];
|
||||||
UINT8 *p = buf;
|
UINT8 *p = buf;
|
||||||
|
|
||||||
// Loading from a config in a netgame? Set revert value.
|
// Loading from a config in a netgame? Set revert value.
|
||||||
|
|
Loading…
Reference in a new issue