2 major bugs

From: Andrey Fidrya (andrey@alex-ua.com)
Date: 05/01/99


I just found two major bugs in stock CircleMUD. Please read this log
carefully:  (my comments are marked with "//"):

Start logging: 01.05.1999 20:39 by Zmey (Three Moons World local)
===
> goto 10.guard
By The Throne In The Great Hall
   You are standing by the King's huge ivory throne.  The throne is, to
[...]
Tom, the King's Lifeguard, is standing here.
Tim, the King's Lifeguard, is standing here.
King Welmar is sitting here.
...he glows with a bright light!

> syslog complete
Your syslog is now complete.

>
[ Krys entering game with no equipment. ]
[ Krys advanced to level 1 ]

> trans krys
Krys arrives from a puff of smoke.

> advance krys 5
Okay.
[ Krys advanced 4 levels to level 5. ]

> stat krys
MALE PC 'Krys'  IDNum: [    2], In room [15017]
Title: the Medium of Magic
L-Des: <None>
Class: Magic User, Lev: [ 5], XP: [  20000], Align: [   0]
[...]
Hit p.:[16/35+6]  Mana p.:[100/119+16]  Move p.:[84/90+20]
[...]

> set krys hit 5
Krys's hit set to 5.

>
Tom, the King's Lifeguard ducks under Krys's fist as he takes a swing at
him.

>
// Here Krys drops his link:
Krys has lost his link.
[ Closing link to: Krys. ]

>
Tom, the King's Lifeguard slashes Krys very hard.
Krys is mortally wounded, and will die soon, if not aided.

>
Krys is slashed in two by a masterful stroke of Tom, the King's Lifeguard!
Krys is dead!  R.I.P.
Krys is rescued by divine forces.
[ Krys killed by Tom, the King's Lifeguard at The Void ]
// The first one!                             ^^^^^^^^ (!!!!!)

>
[ Krys [127.0.0.1] has connected. ]

>
[ Krys entering game with no equipment. ]

> stat krys
MALE PC 'Krys'  IDNum: [    2], In room [ 3001]
Title: the Medium of Magic
L-Des: <None>
Class: Magic User, Lev: [ 5], XP: [  20000], Align: [   0]
// The second one!                 ^^^^^^^ exp remains the same!
Hit p.:[5/35+6]  Mana p.:[119/119+16]  Move p.:[88/90+20]
//      ^^^^^^ as well as HP. :)
===

Nice, isn't it? :)
In my MUD players used this bug to avoid death penalties (level loss, etc).
Just drop link and you'll reenter the game in same state as before death.

The second bug is in handler.c:
  if (!freed && ch->desc != NULL) {
    STATE(ch->desc) = CON_MENU;
    SEND_TO_Q(MENU, ch->desc);
  } else {  /* if a player gets purged from within the game */
    // i.e. characters without descriptors (linkdead) will also be freed
    if (!freed)
      free_char(ch);
  }

  Andrey (andrey@alex-ua.com)
  RMUD: Three Moons World   (rmud.net.ru:4000)


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST