[8850] Check packet opcode for >= NUM_MSG_TYPES before queueing.

Also add check for wrong packet status requirement in code.
This commit is contained in:
XTZGZoReX 2009-11-20 20:11:39 +01:00
parent ab62a11d4e
commit 0011a41003
3 changed files with 86 additions and 83 deletions

View file

@ -659,6 +659,13 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
const ACE_UINT16 opcode = new_pct->GetOpcode ();
if (opcode >= NUM_MSG_TYPES)
{
sLog.outError( "SESSION: received non-existed opcode %s (0x%.4X)",
LookupOpcodeName(opcode), opcode);
return -1;
}
if (closing_)
return -1;