Re: Redit bug

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 08/13/01


Mark Seelenbacher wrote:
>
> #0  0x80b87f6 in str_dup (source=0x0) at utils.c:89
> #1  0x8094e36 in copy_room_strings (dest=0x4016fb00, source=0x83025b0) at genwld.c:427

copy_room_strings() is calling str_dup() with a NULL value (0x0) as
source.  str_dup() attempts to dereference its source arg and that will
always cause a seg fault when you attempt to dereference a NULL value.
I'm figuring that it gets freed and nulled out when you do the /c and
then the save attempts to str_dup the result of the edit which crashes
the MUD.  Try something like this at line 427 of genwld.c:

if (source)
  str_dup(dest, source);
else
  str_dup(dest, "undefined");

Regards, Peter

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST