mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 19:37:01 +00:00
[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:
parent
ab62a11d4e
commit
0011a41003
3 changed files with 86 additions and 83 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue