From 8465910c79b8e746e04fd581cca2d60399e569b9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:07 -0500 Subject: Second Life viewer sources 1.18.3.2-RC --- linden/indra/llmessage/lltemplatemessagereader.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'linden/indra/llmessage/lltemplatemessagereader.cpp') diff --git a/linden/indra/llmessage/lltemplatemessagereader.cpp b/linden/indra/llmessage/lltemplatemessagereader.cpp index 329d2a8..4cde483 100644 --- a/linden/indra/llmessage/lltemplatemessagereader.cpp +++ b/linden/indra/llmessage/lltemplatemessagereader.cpp @@ -502,12 +502,15 @@ BOOL LLTemplateMessageReader::decodeTemplate( return(TRUE); } -void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host ) +void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted ) { // we've run off the end of the packet! llwarns << "Ran off end of packet " << mCurrentRMessageTemplate->mName // << " with id " << mCurrentRecvPacketID << " from " << host + << " trying to read " << wanted + << " bytes at position " << where + << " going past packet end at " << mReceiveSize << llendl; if(gMessageSystem->mVerboseLog) { @@ -562,7 +565,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender // repeat number is a single byte if (decode_pos >= mReceiveSize) { - logRanOffEndOfPacket(sender); + logRanOffEndOfPacket(sender, decode_pos, 1); // default to 0 repeats repeat_number = 0; @@ -621,7 +624,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender if ((decode_pos + data_size) > mReceiveSize) { - logRanOffEndOfPacket(sender); + logRanOffEndOfPacket(sender, decode_pos, data_size); // default to 0 length variable blocks tsize = 0; @@ -657,7 +660,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender // so, copy data pointer and set data size to fixed size if ((decode_pos + mvci.getSize()) > mReceiveSize) { - logRanOffEndOfPacket(sender); + logRanOffEndOfPacket(sender, decode_pos, mvci.getSize()); // default to 0s. U32 size = mvci.getSize(); -- cgit v1.1