Fix buffer overflow when setting NETVAR string console variable and ensure servername is within MAXSERVERNAME
- Jun 04, 2024
-
-
Re Frag authored
This commit adds a verification before setting the servername console variable. We now check that it fits within the MAXSERVERNAME length and we cancel setting it if it doesn't. Letting the servername be more than MAXSERVERNAME could lead to crashes when trying to edit the server name from the menu so, we now avoid those.
-
- May 20, 2024
-
-
Re Frag authored
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.
-