mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Verify OP_Ack size & fix crash in BasePacket::build_raw_header_dump due to uninitialised timestamp
This commit is contained in:
parent
61f7009378
commit
401e897019
@ -1,6 +1,9 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
|
||||
== 04/27/2013 ==
|
||||
Pixel Bounds: Verify OP_Ack size & fix crash in BasePacket::build_raw_header_dump due to uninitialised timestamp.
|
||||
|
||||
== 04/24/2013 ==
|
||||
Bad_Captain: Fixed a couple of merc stat issues.
|
||||
Bad_Captain: Removed unneeded bot pet AI.
|
||||
|
||||
@ -28,6 +28,7 @@ BasePacket::BasePacket(const unsigned char *buf, uint32 len)
|
||||
this->size=0;
|
||||
this->_wpos = 0;
|
||||
this->_rpos = 0;
|
||||
this->timestamp.tv_sec = 0;
|
||||
if (len>0) {
|
||||
this->size=len;
|
||||
pBuffer= new unsigned char[len];
|
||||
|
||||
@ -284,6 +284,11 @@ uint32 processed=0,subpacket_length=0;
|
||||
}
|
||||
break;
|
||||
case OP_Ack: {
|
||||
if(!p->pBuffer || (p->Size() < 4))
|
||||
{
|
||||
_log(NET__ERROR, _L "Received OP_Ack that was of malformed size" __L);
|
||||
break;
|
||||
}
|
||||
#ifndef COLLECTOR
|
||||
uint16 seq=ntohs(*(uint16 *)(p->pBuffer));
|
||||
AckPackets(seq);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user