Login
User Name:

Password:



Register

Forgot your password?
 I3 and IMC
Dec 26, 2024 3:27 am
By GatewaySysop
Hi - Clean SmaugFuss map/description issue..
Dec 15, 2024 7:29 pm
By Samson
AFKMud 2.2.4
Dec 10, 2024 4:09 pm
By Samson
Ubuntu 22.04.5 LTS
Dec 5, 2024 5:10 pm
By Remcon
SmaugFUSS 1.8/1.9
Nov 29, 2024 11:46 am
By Remcon
LOP 1.6
Author: Remcon
Submitted by: Remcon
SWFOTEFUSS 1.5.1
Author: Various
Submitted by: Samson
SWRFUSS 1.4.1
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.5
Author: Various
Submitted by: Samson
AFKMud 2.2.4
Author: AFKMud Team
Submitted by: Samson
Users Online
Google, Bing

Members: 0
Guests: 17
Stats
Files
Topics
Posts
Members
Newest Member
496
3,808
19,708
594
MaisieMacl

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Bugfix Lists » AFKMud Bugfix List » [Bug] Pfile corruption if IMC...
Forum Rules | Mark all | Recent Posts

[Bug] Pfile corruption if IMC channels are denied, or if ignores are set
< Newer Topic :: Older Topic > AFKMud 2.03

Pages:<< prev 1 next >>
Post is unread #1 Feb 4, 2008 8:42 am   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,697
JoinedJan 1, 2002

 
Bug: Pfile corruption if IMC channels are denied, or if ignores are set
Danger: Critical - Data corruption of player files when IMC connections are utilized
Discovered in: AFKMud 2.03
Found by: Samson
Fixed by: Samson

---

imc.cpp, imc_loadchar

Locate:
fread_string( IMC_DENY( ch ), fp );


Chage to:
fread_line( IMC_DENY( ch ), fp ); 


Locate:
         if( !strcasecmp( word, "IMCignore" ) )
         {
            string newign;

            fread_string( newign, fp );
            CH_IMCDATA( ch )->imc_ignore.push_back( newign );
            break;
         }


Change to:
         if( !strcasecmp( word, "IMCignore" ) )
         {
            string newign;

            fread_line( newign, fp );
            CH_IMCDATA( ch )->imc_ignore.push_back( newign );
            break;
         }


While this will have no affect on pfiles where IMC is not being used, it will cause data corruption in the player's inventory if they have set an ignore on someone or if they have been denied use of any of the network channels. The reason for this is because the data is saved with just a newline as the line terminator, but the loading function is expecting a tilde as a terminator. So the entire ignore list will get loaded as a single string, which does not terminate until the first tilde is encountered in the player's inventory data. This will of course cause that first item to be corrupted, and if left unchecked, will eventually corrupt their entire inventory.

Pages:<< prev 1 next >>