Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
481
3,735
19,370
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » AFKMud Bugfix List » AFKMud Bug Archive » [Bug] Group Towngate not safe...
Forum Rules | Mark all | Recent Posts

[Bug] Group Towngate not safely transfering people from the source room
< Newer Topic :: Older Topic > AFKMud 1.64

Pages:<< prev 1 next >>
Post is unread #1 Jan 9, 2005, 12:52 pm   Last edited Nov 13, 2005, 11:59 am by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Bug: Group Towngate spell does not safely transfer people from the source room.
Discovered in: AFKMud 1.64
Danger: High - Potential data corruption + potential game crash.
Found by: Samson
Fixed by: Samson

---

magic.c, spell_group_towngate:

Locate the following:

   if( groupcount == groupvisit )
   {
      leave_map( ch, NULL, room );  /* This will work, regardless. Trust me. */

      for( rch = original->first_person; rch; rch = rch->next_in_room )
      {
         if( is_same_group( rch, ch ) )
            leave_map( rch, ch, room );
      }
      return rNONE;
   }


Replace that segment with:

   if( groupcount == groupvisit )
   {
      CHAR_DATA *rch_next;

      leave_map( ch, NULL, room );  /* This will work, regardless. Trust me. */

      for( rch = original->first_person; rch; rch = rch_next )
      {
         rch_next = rch->next_in_room;

         if( is_same_group( rch, ch ) )
            leave_map( rch, ch, room );
      }
      return rNONE;
   }


The above code segment transfers the caster and their group to the destination room, but fails to maintain the integrity of the linked list in the source room. This can result in pointer corruption and possible game crashes.
       
Pages:<< prev 1 next >>