mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Fix message sending code using hardcoded buffer size
This commit is contained in:
parent
9f37c240a4
commit
d5367d2e65
1 changed files with 2 additions and 2 deletions
|
|
@ -979,7 +979,7 @@ static boolean HU_chatboxContainsOnlySpaces(void)
|
||||||
|
|
||||||
static void HU_sendChatMessage(void)
|
static void HU_sendChatMessage(void)
|
||||||
{
|
{
|
||||||
char buf[2+256];
|
char buf[2 + HU_MAXMSGLEN + 1];
|
||||||
char *msg = &buf[2];
|
char *msg = &buf[2];
|
||||||
size_t ci;
|
size_t ci;
|
||||||
INT32 target = 0;
|
INT32 target = 0;
|
||||||
|
|
@ -1057,7 +1057,7 @@ static void HU_sendChatMessage(void)
|
||||||
|
|
||||||
// we need to get rid of the /pm<player num>
|
// we need to get rid of the /pm<player num>
|
||||||
newmsg = msg+5+spc;
|
newmsg = msg+5+spc;
|
||||||
strlcpy(msg, newmsg, 255);
|
strlcpy(msg, newmsg, HU_MAXMSGLEN + 1);
|
||||||
}
|
}
|
||||||
if (ci > 2) // don't send target+flags+empty message.
|
if (ci > 2) // don't send target+flags+empty message.
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue