Fix buffer overflow when setting NETVAR string console variable and ensure servername is within MAXSERVERNAME

There was a possible crash if you tried setting the servername console variable to something too big from the console. It looks like this crash is caused by a buffer overflow. We fix it by checking that the value is within the MAXSERVERNAME bounds before actually setting the new servername value.

Before:

SRB2_before_fix

After:

SRB2_after_fix

Merge request reports

Loading