>From: "Bob Castillo" <castillo7@hotmail.com>
>To: bugs@circlemud.org
>Subject: minor bug
>Date: Tue, 14 Dec 1999 23:22:30 PST
>
>I just discovered a crashing bug in my circle mud bpl 12, but i see the same
>bug in bpl 16...
>
>in comm.c function "perform_act"
>
>the function initialize *i to NULL
>but, if a function/procedure call "act" with a wrong code like $h, this will
>crash the mud... atlease, you will have a log of that:
>
> default:
> log("SYSERR: Illegal $-code to act(): %c", *orig);
> log("SYSERR: %s", orig);
> break;
>
>but, just after that you do:
> while ((*buf = *(i++)))
> buf++;
>and "i" is still equal to NULL !!!
>
>I fixed the bug by
> if (i)
> while ((*buf = *(i++)))
> buf++
>This bug is nasty, if you're MUD is using aedit (social editor), and you
>make a typo $h instead of $n ...
> Castillo.
The fix I'm using is:
Index: src/comm.c
RCS file: /home/circledb/.cvs/circle/src/comm.c,v
retrieving revision 1.77
diff -u -p -r1.77 comm.c
--- src/comm.c 1999/08/02 00:30:33 1.77
+++ src/comm.c 1999/12/17 16:19:43
@@ -2174,6 +2174,7 @@ void perform_act(const char *orig, struc
default:
log("SYSERR: Illegal $-code to act(): %c", *orig);
log("SYSERR: %s", orig);
+ i = "";
break;
}
while ((*buf = *(i++)))
Since it maintains the case-sets-i precendent.
And on the previous message I did _not_ mean the logos were cheesy but that
my script to create the gallery was cheesy. Just in case people
misinterpret.
--
George Greer | The CircleMUD FAQ
greerga@circlemud.org | http://developer.circlemud.org/docs/FAQ/
+------------------------------------------------------------+
| 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