![](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
Pages:<< prev 1 next >>
![Post is unread](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Black Hand
![](https://smaugmuds.afkmods.com/skins/default/images/7.png)
GroupAdministrators
Posts3,686
JoinedJan 1, 2002
Bug: compressEnd does not free up the MCCP buffer if data fails to send.
Danger: Medium - If you have a lot of people using MCCP disconnecting regularly and not able to receive data, it leaks 4096 bytes every time that happens.
Discovered in: AFKMud 2.1.3
Found by: Nick Gammon
Fixed by: Nick Gammon
---
features.cpp, descriptor_data::compressEnd
Locate:
Change to:
As explained by Nick, if data can't be written to the descriptor when shutting down compression, a chunk of 4096 bytes will be left leaking.
Enough players doing this by disconnecting and reconnecting a lot can lead to substantial memory loss and lead to the need for premature reboots.
Danger: Medium - If you have a lot of people using MCCP disconnecting regularly and not able to receive data, it leaks 4096 bytes every time that happens.
Discovered in: AFKMud 2.1.3
Found by: Nick Gammon
Fixed by: Nick Gammon
---
features.cpp, descriptor_data::compressEnd
Locate:
if( deflate( mccp->out_compress, Z_FINISH ) != Z_STREAM_END ) return false; if( !process_compressed( ) ) /* try to send any residual data */ return false;
Change to:
if( deflate( mccp->out_compress, Z_FINISH ) == Z_STREAM_END ) process_compressed(); /* try to send any residual data */
As explained by Nick, if data can't be written to the descriptor when shutting down compression, a chunk of 4096 bytes will be left leaking.
Enough players doing this by disconnecting and reconnecting a lot can lead to substantial memory loss and lead to the need for premature reboots.
Pages:<< prev 1 next >>