Revert protocol bug added in lasts commit

This commit is contained in:
Eduardo Bart 2012-07-30 21:08:32 -03:00
parent 1de9faa93e
commit a1fb373b1b
1 changed files with 6 additions and 0 deletions

View File

@ -138,6 +138,12 @@ void Protocol::internalRecvData(uint8* buffer, uint16 size)
g_logger.traceError("failed to decrypt message"); g_logger.traceError("failed to decrypt message");
return; return;
} }
} else {
int size = m_inputMessage->getU16();
if(size != m_inputMessage->getUnreadSize()) {
g_logger.traceError("invalid message size");
return;
}
} }
onRecv(m_inputMessage); onRecv(m_inputMessage);