Re: Redit bug

From: Mark (seelenbacher@nc.rr.com)
Date: 08/13/01


> > #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

This check is already in copy_room_strings:

 if (dest == NULL || source == NULL) {
    log("SYSERR: GenOLC: copy_room_strings: NULL values passed.");
    return FALSE;
  }

  dest->description = str_dup(source->description);
  dest->name = str_dup(source->name);

seems like it's not getting checked for some reason.

Mark

--
   +---------------------------------------------------------------+
   | 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