Login
User Name:

Password:



Register

Forgot your password?
Create a tag/flag and store values in it?
Jun 19, 2024 10:24 pm
By finekite
IMC??
Jun 14, 2024 11:39 pm
By Samson
Any Smaug muds running?
Jun 1, 2024 1:47 pm
By Zedethar
Any Chances at making a new Mud
Jun 1, 2024 1:42 pm
By Zedethar
delete this?>
May 30, 2024 7:38 pm
By Elwood
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
Users Online
CommonCrawl, DotBot, Majestic-12, Bing, AhrefsBot

Members: 0
Guests: 4
Stats
Files
Topics
Posts
Members
Newest Member
489
3,797
19,655
603
LouveniaU5

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Bugfix Lists » AFKMud Bugfix List » [Bug] compressEnd does not fr...
Forum Rules | Mark all | Recent Posts

[Bug] compressEnd does not free up the MCCP buffer if data fails to send.
< Newer Topic :: Older Topic > AFKMud 2.1.3

Pages:<< prev 1 next >>
Post is unread #1 Mar 8, 2010 1:46 am   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
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:
   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 >>