diff --git a/changelog.txt b/changelog.txt index d39146a1e..731cf4cfc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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. diff --git a/common/BasePacket.cpp b/common/BasePacket.cpp index 2717ee354..82fd13649 100644 --- a/common/BasePacket.cpp +++ b/common/BasePacket.cpp @@ -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]; diff --git a/common/EQStream.cpp b/common/EQStream.cpp index 561c8f4a6..7c179fab7 100644 --- a/common/EQStream.cpp +++ b/common/EQStream.cpp @@ -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);