mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[8231] Use more safe destination buffer size for zlib compression.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
d838f231ab
commit
0cf083eb55
3 changed files with 6 additions and 5 deletions
|
|
@ -126,7 +126,7 @@ bool UpdateData::BuildPacket(WorldPacket *packet)
|
|||
|
||||
if (pSize > 100 ) // compress large packets
|
||||
{
|
||||
uint32 destsize = pSize;
|
||||
uint32 destsize = compressBound(pSize);
|
||||
packet->resize( destsize + sizeof(uint32) );
|
||||
|
||||
packet->put<uint32>(0, pSize);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue