- fixed : don't overflow the network message buffer when sending an RLV reply

Mon, 27 Feb 2012 20:14:49 +0100

author
Kitty Barnett <develop@catznip.com>
date
Mon, 27 Feb 2012 20:14:49 +0100
changeset 1669
3baef9e5526b
parent 1668
a441202824f2
child 1670
e54b4e270bcb

- fixed : don't overflow the network message buffer when sending an RLV reply
-> truncate at MAX_MSG_STR_LEN (byte size)

indra/newview/rlvcommon.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/rlvcommon.cpp	Sun Jun 05 12:48:53 2011 +0200
     1.2 +++ b/indra/newview/rlvcommon.cpp	Mon Feb 27 20:14:49 2012 +0100
     1.3 @@ -464,7 +464,7 @@
     1.4  	gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
     1.5  	gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
     1.6  	gMessageSystem->nextBlockFast(_PREHASH_ChatData);
     1.7 -	gMessageSystem->addStringFast(_PREHASH_Message, strUTF8Text);
     1.8 +	gMessageSystem->addStringFast(_PREHASH_Message, utf8str_truncate(strUTF8Text, MAX_MSG_STR_LEN));
     1.9  	gMessageSystem->addU8Fast(_PREHASH_Type, CHAT_TYPE_SHOUT);
    1.10  	gMessageSystem->addS32("Channel", nChannel);
    1.11  	gAgent.sendReliableMessage();

mercurial